home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_342 / sksh / reference.doc < prev    next >
Text File  |  1992-05-06  |  119KB  |  6,535 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                                   Reference Manual 
  18.  
  19.                                          SKsh
  20.  
  21.                             A ksh-like Shell for the Amiga
  22.  
  23.                                      Version 1.4
  24.  
  25.  
  26.                                 (Copyright) 1989, 1990
  27.  
  28.                                      Steve Koren
  29.  
  30.                                     March 19, 1990
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.           Table of Contents
  74.  
  75.  
  76.                Introduction......................................4
  77.                !, !!.............................................5
  78.                _ANSI.............................................6
  79.                _DIR_.............................................7
  80.                _FILE_............................................7
  81.                _EXEC_............................................7
  82.                alias.............................................8
  83.                aliases...........................................9
  84.                argcount..........................................10
  85.                SKSHINIT..........................................11
  86.                sksh..............................................12
  87.                basename..........................................13
  88.                break.............................................14
  89.                builtins..........................................15
  90.                cat...............................................16
  91.                cd................................................17
  92.                chmod.............................................18
  93.                clear, cls........................................19
  94.                CLINUM............................................20
  95.                CMDNUM............................................21
  96.                COLUMNS...........................................22
  97.                continue..........................................25
  98.                ctpri.............................................26
  99.                date..............................................27
  100.                dec...............................................28
  101.                dir...............................................29
  102.                dirname...........................................30
  103.                echo..............................................31
  104.                exit..............................................32
  105.                export............................................33
  106.                false.............................................36
  107.                for/do/done.......................................37
  108.                force.............................................38
  109.                function..........................................39
  110.                functions.........................................40
  111.                getenv............................................41
  112.                history...........................................42
  113.                HISTSIZE..........................................43
  114.                HOME..............................................44
  115.                IFS...............................................46
  116.                inc...............................................47
  117.                info..............................................48
  118.                LINES.............................................50
  119.                ll................................................51
  120.                local.............................................53
  121.                LOGOUT............................................54
  122.                ls................................................55
  123.                match.............................................57
  124.                mem...............................................59
  125.                mkdir.............................................60
  126.                mv................................................61
  127.  
  128.  
  129.           SKsh Amiga Shell             Page 2             Reference Manual
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.                OLDPWD............................................62
  140.                options...........................................63
  141.                PATH..............................................66
  142.                path..............................................67
  143.                PNPC..............................................68
  144.                ps................................................69
  145.                PS1...............................................70
  146.                PS2...............................................71
  147.                PWD...............................................72
  148.                pwd...............................................73
  149.                quit..............................................74
  150.                read..............................................75
  151.                return............................................76
  152.                rm................................................77
  153.                rmdir.............................................78
  154.                ROOT..............................................79
  155.                set...............................................80
  156.                SHELL.............................................81
  157.                shift.............................................82
  158.                SIZE..............................................83
  159.                sleep.............................................84
  160.                source............................................85
  161.                stack.............................................86
  162.                SYSNAME...........................................87
  163.                time..............................................88
  164.                touch.............................................89
  165.                true..............................................90
  166.                unalias...........................................91
  167.                unfunc............................................92
  168.                unset.............................................93
  169.                variables.........................................94
  170.                version...........................................95
  171.                whence............................................96
  172.                which.............................................97
  173.                while/do/done.....................................98
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.           SKsh Amiga Shell             Page 3             Reference Manual
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.           Introduction
  206.  
  207.             This reference manual describes each SKsh command,  variable,
  208.             alias, or function in a concise manner.  Each  page  contains
  209.             the following information:
  210.  
  211.             Name:     The name of the command, alias, etc.
  212.  
  213.             Type:     Variable, Alias, Function, Builtin, or Keyword.
  214.  
  215.             Default:  The default value for variables, or definition  for
  216.                       aliases.
  217.  
  218.             Usage:    Command syntax
  219.  
  220.             Range:    Legal values for variables or parameters
  221.  
  222.             About:    Text describing the command, variable, etc.
  223.  
  224.             Example:  A brief example usage.
  225.  
  226.             See Also: Other related commands, variables, etc.
  227.  
  228.             When reading the command syntax, anything in square  brackets
  229.             is  optional.   Anything  followed  by  three  dots  can   be
  230.             repeated any number of times.  A  vertical  bar  is  used  to
  231.             separate option where one or the other, but not both, can  be
  232.             used.
  233.  
  234.             In general, options to commands are preceded by  a  dash  ('-
  235.             ').  The dash character passed alone tells a command to  stop
  236.             reading options.  This can be useful to  pass  a  dash  as  a
  237.             parameter.  For example,
  238.  
  239.                     echo - -
  240.  
  241.             would  print  a  single  dash.   Also,  'command  -a  -b'  is
  242.             equilivant to 'command -ab'.
  243.  
  244.             In version  1.4  of  SKsh,  the  documentation  for  external
  245.             binary commands has been moved to the ExtCmds.doc file.
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.           SKsh Amiga Shell             Page 4             Reference Manual
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.           _________________________________________________________________
  272.  
  273.             Name:     !, !!
  274.  
  275.             Type:     Alias
  276.  
  277.             Default:  history -e
  278.                       history -e -1
  279.  
  280.             Usage:    ! [ pattern | abs_num | rel_num ]
  281.                       !!
  282.  
  283.             Range:    n/a
  284.  
  285.             About:    These two aliases provide an easy way  to  use  the
  286.                       history  -e  command.  !! will execute the previous
  287.                       command from the history list by executing  history
  288.                       -e  -1.    ! will execute a specified command  from
  289.                       the history list.  This command can either  specify
  290.                       an absolute number,  a  relative  offset  from  the
  291.                       most  recent  command   (the   offset   should   be
  292.                       negative), or a partial line or pattern  to  search
  293.                       for.  If a search pattern is given,  it  should  be
  294.                       enclosed in quotes so that SKsh  does  not  attempt
  295.                       file name generation on the wildcard pattern.
  296.  
  297.             Example:  ! cc
  298.  
  299.             See Also: history
  300.  
  301.           _________________________________________________________________
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.           SKsh Amiga Shell             Page 5             Reference Manual
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.           _________________________________________________________________
  338.  
  339.             Name:     _ANSI_BS
  340.                       _ANSI_BE
  341.                       _ANSI_IS
  342.                       _ANSI_IE
  343.                       _ANSI_US
  344.                       _ANSI_UE
  345.                       _ANSI_P1
  346.                       _ANSI_P2
  347.                       _ANSI_P3
  348.                       _ANSI_CLEAR
  349.  
  350.             Type:     Variable
  351.  
  352.             Default:  "^[[1m"                (bold-start)
  353.                       "^[[m"                 (bold-end)
  354.                       "^[[3m"                (italic-start)
  355.                       "^[[m"                 (italic-end)
  356.                       "^[[4m"                (underline-start)
  357.                       "^[[m"                 (underline-end)
  358.                       "^[[0;31;40m"          (pen-1)
  359.                       "^[[0;32;40m"          (pen-2)
  360.                       "^[[0;33;40m"          (pen-3)
  361.                       "^[[H^[[2J"            (clear screen)
  362.  
  363.             Usage:    $_ANSI_??
  364.  
  365.             Range:    n/a
  366.  
  367.             About:    These variables are  set  by  SKsh  to  valid  ANSI
  368.                       escape sequences which control  the  Amiga  console
  369.                       device.  They can be used  in  echo  statements  or
  370.                       prompts.
  371.  
  372.                       Since these  variables,  when  output,  affect  the
  373.                       console device, they are not normally displayed  by
  374.                       the set command.
  375.  
  376.             Example:  echo $_ANSI_CLEAR      # clear the screen
  377.  
  378.             See Also: echo
  379.  
  380.           _________________________________________________________________
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.           SKsh Amiga Shell             Page 6             Reference Manual
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.           _________________________________________________________________
  404.  
  405.             Name:     _DIR_S
  406.                       _DIR_E
  407.                       _FILE_S
  408.                       _FILE_E
  409.                       _EXEC_S
  410.                       _EXEC_E
  411.  
  412.             Type:     Variable
  413.  
  414.             Default:  "$_ANSI_P3"            (dir-start)
  415.                       "$_ANSI_P1"            (dir-end)
  416.                       NULL                   (file-start)
  417.                       NULL                   (file-end)
  418.                       NULL                   (exec-start)
  419.                       NULL                   (exec-end)
  420.  
  421.             Usage:
  422.  
  423.             Range:    n/a
  424.  
  425.             About:    These variables control the display format  of  the
  426.                       'ls' command when the '-F' option is set (as it  is
  427.                       by default when the  'dir'  or  'll'  commands  are
  428.                       used).  Before printing each file name (whether  in
  429.                       a short or long format listing), SKsh will  examine
  430.                       the file type.  If  the  it  is  a  directory,  the
  431.                       contents of the _DIR_S variable is printed.  If  it
  432.                       is a file, the contents if _FILE_S is printed.   If
  433.                       the 'e' bit is set, _EXEC_S is  printed.   (Because
  434.                       of this, it is possible to print more than  one  of
  435.                       the above variables if the name is both a file  and
  436.                       has its 'e' bit set).
  437.  
  438.                       In  a  similar  manner,   the   contents   of   the
  439.                       appropriate _FILE_E, _DIR_E, and _EXEC_E  variables
  440.                       is printed after the file name.   This  allows  the
  441.                       format of the directory listing to be customized.
  442.  
  443.                       These variables  are  only  output  when  the  '-F'
  444.                       option is used.  Also, their  contents  is  printed
  445.                       verbatim; it is not expanded as with 'PS1'.   Thus,
  446.                       any  variables  should  be  expanded   when   these
  447.                       variables are set, as in the example below.
  448.  
  449.             Example:  _FILE_S="$_ANSI_US"   # underline file names
  450.                       _FILE_E="$_ANSI_UE"
  451.  
  452.             See Also: ls, dir, ll
  453.  
  454.           _________________________________________________________________
  455.  
  456.  
  457.  
  458.  
  459.           SKsh Amiga Shell             Page 7             Reference Manual
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.           _________________________________________________________________
  470.  
  471.             Name:     alias
  472.  
  473.             Type:     Builtin
  474.  
  475.             Default:  n/a
  476.  
  477.             Usage:    alias [ pattern | string [ '=' ] string ]
  478.  
  479.             Range:    n/a
  480.  
  481.             About:    The alias builtin command (not to be confused  with
  482.                       'aliases', which is itself an  alias)  is  used  to
  483.                       set and list aliases.  If given no  parameters,  it
  484.                       simply acts as a 'set -a' command.   If  given  one
  485.                       parameter,  which  is  a   pattern,   all   aliases
  486.                       matching that pattern are printed.   If  given  two
  487.                       parameters (or there where the second  is  a  '='),
  488.                       the first string becomes an alias with  the  second
  489.                       string as its definition.
  490.  
  491.                       Aliases are expanded when used as a  command.   Any
  492.                       arguments are appended to the text of  the  aliases
  493.                       and the resulting string is executed.
  494.  
  495.                       Unlike  ksh and sh, there can be spaces surrounding
  496.                       the '=' sign, which is itself optional.
  497.  
  498.             Example:  alias foo='echo "This is the foo alias"'
  499.  
  500.             See Also: set, alias, unalias
  501.  
  502.           _________________________________________________________________
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.           SKsh Amiga Shell             Page 8             Reference Manual
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.           _________________________________________________________________
  536.  
  537.             Name:     aliases
  538.  
  539.             Type:     Alias
  540.  
  541.             Default:  set -a
  542.  
  543.             Usage:    aliases [-s] [pattern]
  544.  
  545.             Range:    n/a
  546.  
  547.             About:    This alias  lists  defined  aliases.   The  pattern
  548.                       uses normal wildcards, but must be quoted to  avoid
  549.                       being  interpreted  by   the   filename   expansion
  550.                       mechanism.  If the pattern is omitted, all  aliases
  551.                       in the current  context  are  listed  except  those
  552.                       beginning with an underscore (hidden aliases).
  553.  
  554.                       Only aliases for the current  context  are  listed,
  555.                       so this command may have a different effect  inside
  556.                       of  a  subshell  or  function   than   when   typed
  557.                       manually.
  558.  
  559.             Example:  aliases -s '[a-h]*'
  560.  
  561.             See Also: set, alias
  562.  
  563.           _________________________________________________________________
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.           SKsh Amiga Shell             Page 9             Reference Manual
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.           _________________________________________________________________
  602.  
  603.             Name:     argcount
  604.  
  605.             Type:     Builtin
  606.  
  607.             Default:  n/a
  608.  
  609.             Usage:    argcount [ parameter ... ]
  610.  
  611.             Range:    n/a
  612.  
  613.             About:    argcount simply prints a count of its arguments.
  614.  
  615.             Example:  argcount should 'print two'
  616.  
  617.             See Also:
  618.  
  619.           _________________________________________________________________
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.           SKsh Amiga Shell            Page 10             Reference Manual
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.           _________________________________________________________________
  668.  
  669.             Name:     SKSHINIT
  670.  
  671.             Type:     Variable
  672.  
  673.             Default:  "s:.skshrc"
  674.  
  675.             Usage:    $SKSHINIT
  676.  
  677.             Range:    n/a
  678.  
  679.             About:    This variable is set in the .skshinit file  to  the
  680.                       name  of  a  user  modifiable  configuration  file.
  681.                       Normally   this   is   "s:.skshrc".     The    user
  682.                       configuration file is sourced (not  executed!)  for
  683.                       interactive SKsh sessions.
  684.  
  685.                       The   s:.skshrc   file   is   provided   for   user
  686.                       modification.     Users    should    not     modify
  687.                       s:.skshinit.  If you wish to change something  that
  688.                       is defined in s:.skshinit, simply  redefine  it  in
  689.                       s:.skshrc.     s:.skshrc    is    sourced     after
  690.                       s:.skshinit.
  691.  
  692.                       Your s:.skshrc file  may  optionally  source  other
  693.                       files.
  694.  
  695.             Example:
  696.  
  697.             See Also: sksh, source
  698.  
  699.           _________________________________________________________________
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.           SKsh Amiga Shell            Page 11             Reference Manual
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.           _________________________________________________________________
  734.  
  735.             Name:     sksh
  736.  
  737.             Type:     External Command
  738.  
  739.             Default:  n/a
  740.  
  741.             Usage:    sksh [ -c string | fspec ... ]
  742.  
  743.             Range:    n/a
  744.  
  745.             About:    This is, of  course,  the  main  SKsh  binary.   If
  746.                       invoked with no  parameters,  an  interactive  SKsh
  747.                       session is  started.   If  invoked  with  the  '-c'
  748.                       option  followed  by  a  string,  the   string   is
  749.                       executed by SKsh as if it had been typed, and  SKsh
  750.                       exits when  the  operation  is  complete.   If  the
  751.                       string contains spaces, it must  be  surrounded  by
  752.                       quotes  (although  this  depends  on  the  invoking
  753.                       shell or environment).  If  invoked  with  filespec
  754.                       arguments, each  file  in  turn  is  executed  (not
  755.                       sourced).  SKsh then exits when finished  executing
  756.                       all the files.
  757.  
  758.                       If  SKsh  is  invoked  non-interactively,  it  will
  759.                       still read the .skshinit file, but not the  .skshrc
  760.                       file.  This allows you to  have  output  statements
  761.                       in the .skshrc  file  without  having  this  output
  762.                       appear when non-interacrive scripts  are  run.   If
  763.                       you really want to  run  the  .skshrc  file  first,
  764.                       use:
  765.  
  766.                          sksh s:.skshrc my_file.sksh
  767.  
  768.             Example:  sksh -c "expr 21 * 2"
  769.  
  770.             See Also: source
  771.  
  772.           _________________________________________________________________
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.           SKsh Amiga Shell            Page 12             Reference Manual
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.           _________________________________________________________________
  800.  
  801.             Name:     basename
  802.  
  803.             Type:     Builtin
  804.  
  805.             Default:  n/a
  806.  
  807.             Usage:    basename [ fspec ... ]
  808.  
  809.             Range:    n/a
  810.  
  811.             About:    basename prints the "base" name of  a  given  path.
  812.                       For example, the basename of  sys:System/Format  is
  813.                       simply Format.  Note that the  basename  may  be  a
  814.                       directory  and  not  a  file;  for   example,   the
  815.                       basename of sys:usr/bin is bin, even though bin  is
  816.                       a directory.   If  basename is passed more than one
  817.                       parameter,  it  prints   the   basename   of   each
  818.                       parameter in turn.
  819.  
  820.             Example:  basename sys:usr/bin/wc
  821.  
  822.             See Also: dirname, extname
  823.  
  824.           _________________________________________________________________
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.           SKsh Amiga Shell            Page 13             Reference Manual
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.           _________________________________________________________________
  866.  
  867.             Name:     break
  868.  
  869.             Type:     Builtin
  870.  
  871.             Default:  n/a
  872.  
  873.             Usage:    break [ num ]
  874.  
  875.             Range:    n/a
  876.  
  877.             About:    break exits gracefully  from  an  enclosing  for or
  878.                       while loop.  If a numeric  argument  is  given,  it
  879.                       breaks from that many enclosing  levels  of  for or
  880.                       while.
  881.  
  882.             Example:  for a in a b c d e f
  883.                       do
  884.                          echo $a
  885.                          if [ "$a" = "c" ] then break; fi
  886.                       done
  887.  
  888.             See Also: continue
  889.  
  890.           _________________________________________________________________
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.           SKsh Amiga Shell            Page 14             Reference Manual
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.           _________________________________________________________________
  932.  
  933.             Name:     builtins
  934.  
  935.             Type:     Alias
  936.  
  937.             Default:  set -b
  938.  
  939.             Usage:    builtins [-s] [pattern]
  940.  
  941.             Range:    n/a
  942.  
  943.             About:    This aliases  lists  SKsh  builtin  commands.   The
  944.                       pattern uses normal wildcards, but must  be  quoted
  945.                       to  avoid  being  interpreted   by   the   filename
  946.                       expansion mechanism.  If the  pattern  is  omitted,
  947.                       all builtins  are  listed  except  those  beginning
  948.                       with an  underscore  character  (hidden  builtins).
  949.                       There are currently no hidden builtins.
  950.  
  951.             Example:  builtins -s '[a-h]*'
  952.  
  953.             See Also: set
  954.  
  955.           _________________________________________________________________
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.           SKsh Amiga Shell            Page 15             Reference Manual
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.           _________________________________________________________________
  998.  
  999.             Name:     cat
  1000.  
  1001.             Type:     Builtin
  1002.  
  1003.             Default:  n/a
  1004.  
  1005.             Usage:    cat [ fspec ... ]
  1006.  
  1007.             Range:    n/a
  1008.  
  1009.             About:    cat prints the contents of each file passed  to  it
  1010.                       on the command line, or the standard  input  if  no
  1011.                       files are passed.  The contents of  each  file  are
  1012.                       concatenated,  and  are  not  separated  by   blank
  1013.                       lines.
  1014.  
  1015.                       In  SKsh,  cat cannot be used  to  transfer  binary
  1016.                       files, only ASCII data.  Also, the sequence:
  1017.  
  1018.                          cat my_file.txt > my_file1.txt
  1019.  
  1020.                       can be faster accomplished with the cp command.
  1021.  
  1022.             Example:  cat my_file.txt
  1023.  
  1024.             See Also: cp
  1025.  
  1026.           _________________________________________________________________
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.           SKsh Amiga Shell            Page 16             Reference Manual
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.           _________________________________________________________________
  1064.  
  1065.             Name:     cd
  1066.  
  1067.             Type:     Builtin
  1068.  
  1069.             Default:  n/a
  1070.  
  1071.             Usage:    cd [ -p | dirname ]
  1072.  
  1073.             Range:    n/a
  1074.  
  1075.             About:    cd  changes  the  current  working   directory   to
  1076.                       dirname,  or  to  the   previous   directory   (the
  1077.                       contents of the OLDPWD variable) if the -p flag  is
  1078.                       set.  If no parameters are passed,  cd moves to the
  1079.                       directory indicated by the HOME variable.  This  is
  1080.                       convenient when you are doing most of your work  in
  1081.                       one place, and wish to return there easily.   Under
  1082.                       AmigaDos, the HOME variable  can  be  changed  very
  1083.                       easily with:
  1084.  
  1085.                          HOME=.
  1086.  
  1087.                       That is, you do not have  to  worry  about  certain
  1088.                       files being in the HOME directory as you  do  in  a
  1089.                       multi-user operating system such as UNIX.
  1090.  
  1091.             Example:  cd -p        # go back to old directory
  1092.  
  1093.             See Also: PWD, pwd, OLDDIR
  1094.  
  1095.           _________________________________________________________________
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.           SKsh Amiga Shell            Page 17             Reference Manual
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.           _________________________________________________________________
  1130.  
  1131.             Name:     chmod
  1132.  
  1133.             Type:     Builtin
  1134.  
  1135.             Default:  n/a
  1136.  
  1137.             Usage:    chmod flags | +flags | -flags   [ file ... ]
  1138.  
  1139.             Range:    flags : "hsparewd"
  1140.  
  1141.             About:    chmod changes  the  file  protection  bits  on  the
  1142.                       named files.  Flags can  be  one  or  more  of  the
  1143.                       following  letters:  "hsparewd".   If   the   flags
  1144.                       parameter is given directly with no leading '+'  or
  1145.                       '-', the permissions for all the  named  files  are
  1146.                       set to  that  value.   A  leading  '+'  causes  the
  1147.                       indicated  permissions  bits  to  be  set   without
  1148.                       changing the others, and a leading '-' causes  them
  1149.                       to be reset.  In addition, a 'x'  may  be  used  in
  1150.                       place of the 'e' flag.
  1151.  
  1152.             Example:  chmod -a *.c   # reset archive bit on all .c files
  1153.  
  1154.             See Also: ls
  1155.  
  1156.           _________________________________________________________________
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.           SKsh Amiga Shell            Page 18             Reference Manual
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.           _________________________________________________________________
  1196.  
  1197.             Name:     clear, cls
  1198.  
  1199.             Type:     Alias
  1200.  
  1201.             Default:  echo -n $_ANSI_CLEAR
  1202.  
  1203.             Usage:    clear
  1204.  
  1205.             Range:    n/a
  1206.  
  1207.             About:    These aliases both  clear  the  screen  by  echoing
  1208.                       $_ANSI_CLEAR.
  1209.  
  1210.             Example:  clear
  1211.  
  1212.             See Also: _ANSI_CLEAR
  1213.  
  1214.           _________________________________________________________________
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.           SKsh Amiga Shell            Page 19             Reference Manual
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.           _________________________________________________________________
  1262.  
  1263.             Name:     CLINUM
  1264.  
  1265.             Type:     Variable
  1266.  
  1267.             Default:  n/a
  1268.  
  1269.             Usage:    $CLINUM
  1270.  
  1271.             Range:    1 to maximum process number limit
  1272.  
  1273.             About:    This variable is set to the CLI process  number  of
  1274.                       SKsh when it is started.
  1275.  
  1276.             Example:  echo "Process # = $CLINUM"
  1277.  
  1278.             See Also:
  1279.  
  1280.           _________________________________________________________________
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.           SKsh Amiga Shell            Page 20             Reference Manual
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.           _________________________________________________________________
  1328.  
  1329.             Name:     CMDNUM
  1330.  
  1331.             Type:     Variable
  1332.  
  1333.             Default:  n/a
  1334.  
  1335.             Usage:    $CMDNUM
  1336.  
  1337.             Range:    1 to 16 million
  1338.  
  1339.             About:    Each time SKsh inputs a  line  from  the  keyboard,
  1340.                       this variable is incremented.
  1341.  
  1342.             Example:  echo "$CMDNUM lines have been entered so far."
  1343.  
  1344.             See Also: history
  1345.  
  1346.           _________________________________________________________________
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.           SKsh Amiga Shell            Page 21             Reference Manual
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.           _________________________________________________________________
  1394.  
  1395.             Name:     COLUMNS
  1396.  
  1397.             Type:     Variable
  1398.  
  1399.             Default:  72
  1400.  
  1401.             Usage:    $COLUMNS
  1402.  
  1403.             Range:    15 to 130
  1404.  
  1405.             About:    This variable is one  of  several  responsible  for
  1406.                       controlling the actions of SKsh  line  editing  and
  1407.                       display output.  If line editing  is  enabled,  and
  1408.                       the cursor moves beyond  the  column  indicated  by
  1409.                       this variable, SKsh slides the line to the left  by
  1410.                       12 characters.  SKsh also  uses  this  variable  to
  1411.                       truncate  the  output  of  certain  internal   SKsh
  1412.                       commands  (such  as  History).   This   creates   a
  1413.                       cleaner display.
  1414.  
  1415.                       This variable  is  normally  set  automatically  by
  1416.                       SKsh when the  window  is  resized,  although  this
  1417.                       behavior can be disabled with the options command.
  1418.  
  1419.             Example:  COLUMNS=78
  1420.  
  1421.             See Also: PNPC, LINES, options
  1422.  
  1423.           _________________________________________________________________
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.           SKsh Amiga Shell            Page 22             Reference Manual
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.           _________________________________________________________________
  1460.  
  1461.             Name:     complist
  1462.  
  1463.             Type:     builtin
  1464.  
  1465.             Default:  -l option
  1466.  
  1467.             Usage:    complist [ -adel ] [ names ... ]
  1468.  
  1469.             Range:    n/a
  1470.  
  1471.             About:    The  complist command provides a method  to  extend
  1472.                       the command  line  filename  completion  mechanism.
  1473.                       It only functions if SKsh command line  editing  is
  1474.                       enabled.  SKsh  maintains  an  internal  completion
  1475.                       list  of  user  defined  strings.   When  <tab>  or
  1476.                       <esc><esc> are  used  to  complete  a  string,  the
  1477.                       internal  completion  list  is   consulted   before
  1478.                       completion is attempted on files.  If  a  match  is
  1479.                       found in the internal completion list (even  if  it
  1480.                       is but a partial match), it is used.  If not,  then
  1481.                       filename completion proceeds as normal.  An  option
  1482.                       is provided to turn off  this  behavious  (see  the
  1483.                       options command for details).
  1484.  
  1485.                       -a   Add the supplied arguments to  the  completion
  1486.                            list.  The old contents of the list  are  left
  1487.                            in place.
  1488.  
  1489.                       -d   Delete  the  supplied   arguments   from   the
  1490.                            completion list.
  1491.  
  1492.                       -e   Empty the completion list.
  1493.  
  1494.                       -l   List the contents of the completion list,  one
  1495.                            name per line.  If no  command  line  switches
  1496.                            are given, this is the default.
  1497.  
  1498.             Hints:    The completion list can,  among  other  things,  be
  1499.                       used to:
  1500.  
  1501.                       *    Maintain a user defined  list  of  strings  to
  1502.                            contain, for example, device or program  names
  1503.                            (such as "graphics:"  or  "calculator")  which
  1504.                            are commonly typed.
  1505.  
  1506.                       *    Contain programs names which are found in  the
  1507.                            search path.
  1508.  
  1509.                       *    Buffer the contents of the  current  directory
  1510.                            so that subsequent successful  completions  do
  1511.                            not have to read the  directory.   This  makes
  1512.                            filename completion usable on a  floppy  based
  1513.  
  1514.  
  1515.           SKsh Amiga Shell            Page 23             Reference Manual
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.                            system or on a  hard  disk  when  a  directory
  1526.                            contains a large number  of  files.   A  shell
  1527.                            function is supplied in  the  Stuff.sksh  file
  1528.                            which adds the files in the current  directory
  1529.                            to the completion list.
  1530.  
  1531.                       *    Perform completion on files stored  inside  of
  1532.                            a zoo archive.  A  function  supplied  in  the
  1533.                            Stuff.sksh file facilitates this process.   It
  1534.                            could also, with a little  work,  be  extended
  1535.                            to handle other archive types.
  1536.  
  1537.             Example:  complist -e     # empty the completion list
  1538.                       # now add these names...
  1539.                       complist -a graphics: my_program foo
  1540.  
  1541.             See Also: COMPLIST
  1542.                       zget, cget (from Stuff.sksh)
  1543.  
  1544.           _________________________________________________________________
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.           SKsh Amiga Shell            Page 24             Reference Manual
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.           _________________________________________________________________
  1592.  
  1593.             Name:     continue
  1594.  
  1595.             Type:     Builtin
  1596.  
  1597.             Default:  n/a
  1598.  
  1599.             Usage:    continue [ num ]
  1600.  
  1601.             Range:    n/a
  1602.  
  1603.             About:    continue resumes execution with the next  iteration
  1604.                       of the surrounding  loop,  or  the  nth  subsequent
  1605.                       iteration if given a numeric argument.
  1606.  
  1607.             Example:  for a in a b c d e f
  1608.                       do
  1609.                          echo $a
  1610.                          if [ "$a" = "c" ] then continue; fi
  1611.                          echo "This is not echoed when $a = c"
  1612.                       done
  1613.  
  1614.             See Also: break
  1615.  
  1616.           _________________________________________________________________
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.           SKsh Amiga Shell            Page 25             Reference Manual
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.           _________________________________________________________________
  1658.  
  1659.             Name:     ctpri
  1660.  
  1661.             Type:     Alias
  1662.  
  1663.             Default:  ChangeTaskPri
  1664.  
  1665.             Usage:    ctpri
  1666.                       ctpri num
  1667.  
  1668.             Range:    -31 <= num <= 31
  1669.  
  1670.             About:    This alias is provided as  a  shorter  alternative  to
  1671.                       the  AmigaDos  ChangeTaskPri  command.   Its  use   is
  1672.                       identical.
  1673.  
  1674.             Example:  ctpri 1
  1675.  
  1676.             See Also: stack
  1677.  
  1678.           _________________________________________________________________
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.           SKsh Amiga Shell            Page 26             Reference Manual
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.           _________________________________________________________________
  1724.  
  1725.             Name:     date
  1726.  
  1727.             Type:     Builtin
  1728.  
  1729.             Default:  n/a
  1730.  
  1731.             Usage:    date [-aDmdty]
  1732.  
  1733.             Range:    n/a
  1734.  
  1735.             About:    Date  prints  the  current  date  as  a  24  character
  1736.                       string:
  1737.  
  1738.                          DDD mmm dd hh:mm:ss yyyy
  1739.  
  1740.                       Date  with  the  -a (all) option is identical to  date
  1741.                       with no parameters, (which prints the date as  above).
  1742.                       Date  -D prints a three  character  representation  of
  1743.                       the  day  of  the  week.    Date  -m  prints  a  three
  1744.                       character  representation  of  the  month.    Date  -d
  1745.                       prints the day number as two  digits.   Date -t prints
  1746.                       the time string,  and  date -y prints the year as four
  1747.                       digits.
  1748.  
  1749.             Example:  date -y    # find the year
  1750.  
  1751.             See Also: time
  1752.  
  1753.           _________________________________________________________________
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.           SKsh Amiga Shell            Page 27             Reference Manual
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.           _________________________________________________________________
  1790.  
  1791.             Name:     dec
  1792.  
  1793.             Type:     Builtin
  1794.  
  1795.             Default:  n/a
  1796.  
  1797.             Usage:    dec var [ count ]
  1798.  
  1799.             Range:    n/a
  1800.  
  1801.             About:    dec decrements the  contents  of  the  variable  by
  1802.                       count,  or  1  if  count  is  not  given.   It   is
  1803.                       equivalent to, but faster than, 'var=$(expr $var  -
  1804.                       $count)'
  1805.  
  1806.             Example:  dec my_var 3
  1807.  
  1808.             See Also: inc
  1809.  
  1810.           _________________________________________________________________
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.           SKsh Amiga Shell            Page 28             Reference Manual
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.           _________________________________________________________________
  1856.  
  1857.             Name:     dir
  1858.  
  1859.             Type:     Alias
  1860.  
  1861.             Default:  ls -bF
  1862.  
  1863.             Usage:    dir [ file | dir ] ...
  1864.  
  1865.             Range:    n/a
  1866.  
  1867.             About:    dir prints a short format directory  listing,  with
  1868.                       only the basename of each file printed.  Note  that
  1869.                       the 'F' option to 'ls' is set.
  1870.  
  1871.             Example:  dir s:
  1872.  
  1873.             See Also: ls, ll
  1874.  
  1875.           _________________________________________________________________
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.           SKsh Amiga Shell            Page 29             Reference Manual
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.           _________________________________________________________________
  1922.  
  1923.             Name:     dirname
  1924.  
  1925.             Type:     Builtin
  1926.  
  1927.             Default:  n/a
  1928.  
  1929.             Usage:    dirname [ fspec ... ]
  1930.  
  1931.             Range:    n/a
  1932.  
  1933.             About:    dirname prints the  "directory"  name  of  a  given
  1934.                       path.     For    example,    the     dirname     of
  1935.                       sys:System/Format is simply sys:System. If  dirname
  1936.                       is passed more than one parameter,  it  prints  the
  1937.                       dirname of each parameter in turn.
  1938.  
  1939.             Example:  dirname sys:usr/bin/wc
  1940.  
  1941.             See Also: basename, extname
  1942.  
  1943.           _________________________________________________________________
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.           SKsh Amiga Shell            Page 30             Reference Manual
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.           _________________________________________________________________
  1988.  
  1989.             Name:     echo
  1990.  
  1991.             Type:     Builtin
  1992.  
  1993.             Default:  n/a
  1994.  
  1995.             Usage:    echo [-nc] [ parameter ... ]
  1996.  
  1997.             Range:    n/a
  1998.  
  1999.             About:    The  echo  command  simply  prints  its  arguments  to
  2000.                       standard output.  If given no arguments, it  prints  a
  2001.                       newline.   Otherwise,   it   prints   its   arguments,
  2002.                       separated by a single space, unless  the  -c option is
  2003.                       set, in which case no separating  spaces  are  printed
  2004.                       (concatenation  mode).    Echo   normally   prints   a
  2005.                       trailing  newline,  unless  the  -n option is set,  in
  2006.                       which case no trailing newline is printed.
  2007.  
  2008.                       'echo -c' is useful for concatenating strings:
  2009.  
  2010.                          result = $(echo -c This '+' That)
  2011.  
  2012.             Example:  echo 'These' 'arguments' are "echoed"
  2013.  
  2014.             See Also:
  2015.  
  2016.           _________________________________________________________________
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.           SKsh Amiga Shell            Page 31             Reference Manual
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.           _________________________________________________________________
  2054.  
  2055.             Name:     exit
  2056.  
  2057.             Type:     Builtin
  2058.  
  2059.             Default:  n/a
  2060.  
  2061.             Usage:    exit [ code ]
  2062.  
  2063.             Range:    n/a
  2064.  
  2065.             About:    exit leaves SKsh, returning execution back  to  the
  2066.                       invoking  shell.   If  invoked   with   a   numeric
  2067.                       argument,  it  returns  that  exit  code   to   the
  2068.                       invoking shell or program.
  2069.  
  2070.                       Note  that  exit always exits  SKsh  entirely.   To
  2071.                       simply exit a script or function,  use  the  return
  2072.                       statement.  If  the  LOGOUT  variable  is  defined,
  2073.                       exit will execute that string before terminating.
  2074.  
  2075.             Example:  exit    # exits successfully
  2076.  
  2077.             See Also: return, LOGOUT
  2078.  
  2079.           _________________________________________________________________
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.           SKsh Amiga Shell            Page 32             Reference Manual
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.           _________________________________________________________________
  2120.  
  2121.             Name:     export
  2122.  
  2123.             Type:     Builtin
  2124.  
  2125.             Default:  n/a
  2126.  
  2127.             Usage:    export [ var ... ]
  2128.  
  2129.             Range:    n/a
  2130.  
  2131.             About:    export does two things.  It sets the value  of  the
  2132.                       indicated variables in the topmost symbol table  in
  2133.                       SKsh, and it sets an AmigaDos environment  variable
  2134.                       with the same name and value.   This  is  the  only
  2135.                       way to transfer variable values between  executions
  2136.                       of SKsh.
  2137.  
  2138.             Example:  export my_var1 my_var2
  2139.  
  2140.             See Also: getenv
  2141.  
  2142.           _________________________________________________________________
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.           SKsh Amiga Shell            Page 33             Reference Manual
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.           _________________________________________________________________
  2186.  
  2187.             Name:     expr
  2188.  
  2189.             Type:     Keyword
  2190.  
  2191.             Default:  n/a
  2192.  
  2193.             Usage:    expr length string
  2194.                       expr num_expression
  2195.                       expr index str pattern
  2196.                       expr substr num1 num2
  2197.  
  2198.             Range:    n/a
  2199.  
  2200.             About:    expr  evaluates  and  prints  the  results  of   an
  2201.                       expression.
  2202.  
  2203.                       expr length string
  2204.  
  2205.                          prints the length in characters of the string
  2206.  
  2207.                       expr num_expression
  2208.  
  2209.                          prints the result of evaluating  num_expression.
  2210.                          num_expression   is   an   integer    expression
  2211.                          computed with 32 bit integers.  '+',  '-',  '*',
  2212.                          '/', and '%' can be used.   '*',  '/',  and  '%'
  2213.                          have a  higher  precedence  than  '+'  and  '-';
  2214.                          otherwise, the expression is evaluated  left  to
  2215.                          right.  Parentheses can be used.
  2216.  
  2217.                       expr index str pattern
  2218.  
  2219.                          prints the index of  pattern  if  found  in  the
  2220.                          string, or 0 if not found.  The  first  position
  2221.                          in string is 1, not 0.  Unlike ksh, pattern  can
  2222.                          be more than one character.
  2223.  
  2224.                       expr substr string num1 num2
  2225.  
  2226.                          prints the substring of the string  starting  at
  2227.                          the position indicated  by  num1  and  extending
  2228.                          for  num2  characters.   The  beginning  of  the
  2229.                          string is at position one, not 0.
  2230.  
  2231.             Example:  expr 3 * ( 1 + 4 )
  2232.  
  2233.             See Also:
  2234.  
  2235.           _________________________________________________________________
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.           SKsh Amiga Shell            Page 34             Reference Manual
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.           _________________________________________________________________
  2252.  
  2253.             Name:     extname
  2254.  
  2255.             Type:     Builtin
  2256.  
  2257.             Default:  n/a
  2258.  
  2259.             Usage:    extname [ fspec ]
  2260.  
  2261.             Range:    n/a
  2262.  
  2263.             About:    extname prints the  "extension"  of  a  given  path
  2264.                       name.  For example, the extension of  my_file.c  is
  2265.                       simply 'c'.
  2266.  
  2267.             Example:  extname my_file.c
  2268.  
  2269.             See Also: basename, dirname
  2270.  
  2271.           _________________________________________________________________
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.           SKsh Amiga Shell            Page 35             Reference Manual
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.           _________________________________________________________________
  2318.  
  2319.             Name:     false
  2320.  
  2321.             Type:     Builtin
  2322.  
  2323.             Default:  n/a
  2324.  
  2325.             Usage:    false
  2326.  
  2327.             Range:    n/a
  2328.  
  2329.             About:    false simply returns a false exit  code,  and  does
  2330.                       nothing else.
  2331.  
  2332.             Example:  if false
  2333.                       then
  2334.                          echo 'This will never echo'
  2335.                       fi
  2336.  
  2337.             See Also: true
  2338.  
  2339.           _________________________________________________________________
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.           SKsh Amiga Shell            Page 36             Reference Manual
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.           _________________________________________________________________
  2384.  
  2385.             Name:     for/do/done
  2386.  
  2387.             Type:     Keywords
  2388.  
  2389.             Default:  n/a
  2390.  
  2391.             Usage:    for var in list do stmt_list done
  2392.  
  2393.             Range:    n/a
  2394.  
  2395.             About:    The variable is set to each value in  list, and for
  2396.                       each value, the statement list is executed.
  2397.  
  2398.             Example:  for file in *.h *.c
  2399.                       do
  2400.                          cp $file $file.bak
  2401.                       done
  2402.  
  2403.             See Also: while
  2404.  
  2405.           _________________________________________________________________
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.           SKsh Amiga Shell            Page 37             Reference Manual
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.           _________________________________________________________________
  2450.  
  2451.             Name:     force
  2452.  
  2453.             Type:     Keyword
  2454.  
  2455.             Default:  n/a
  2456.  
  2457.             Usage:    force [ -fba ] command [ parameter ... ]
  2458.  
  2459.             Range:    n/a
  2460.  
  2461.             About:    force  forces  SKsh  to  interpret   command  as  a
  2462.                       function, builtin, or alias.  Exactly  one  of  the
  2463.                       'f', 'b', and 'a' flags must be present.   force is
  2464.                       useful if the builtin commands are redefined.
  2465.  
  2466.             Example:  function date {
  2467.                          echo -n 'The date is: '
  2468.                          force -b date
  2469.                       }
  2470.  
  2471.             See Also:
  2472.  
  2473.           _________________________________________________________________
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.           SKsh Amiga Shell            Page 38             Reference Manual
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.           _________________________________________________________________
  2516.  
  2517.             Name:     function
  2518.  
  2519.             Type:     Keyword
  2520.  
  2521.             Default:  n/a
  2522.  
  2523.             Usage:    function name { stmt_list }
  2524.  
  2525.             Range:    n/a
  2526.  
  2527.             About:    function defines an SKsh function called  name, and
  2528.                       with the definition given by the statement list.
  2529.  
  2530.             Example:  function my_func {
  2531.                          echo "I was passed $# parameters"
  2532.  
  2533.             See Also: functions
  2534.  
  2535.           _________________________________________________________________
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.           SKsh Amiga Shell            Page 39             Reference Manual
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.           _________________________________________________________________
  2582.  
  2583.             Name:     functions
  2584.  
  2585.             Type:     Alias
  2586.  
  2587.             Default:  set -f
  2588.  
  2589.             Usage:    functions [pattern]
  2590.  
  2591.             Range:    n/a
  2592.  
  2593.             About:    This alias lists defined  functions.   The  pattern
  2594.                       uses normal wildcards, but must be quoted to  avoid
  2595.                       being  interpreted  by   the   filename   expansion
  2596.                       mechanism.   If  the  pattern   is   omitted,   all
  2597.                       functions are listed except  those  beginning  with
  2598.                       an underscore character (hidden functions).
  2599.  
  2600.                       Only functions for the current context are  listed,
  2601.                       so this command may have a different effect  inside
  2602.                       of  a  subshell  or  function   than   when   typed
  2603.                       manually.
  2604.  
  2605.             Example:  functions '[a-h]*'
  2606.  
  2607.             See Also: set
  2608.  
  2609.           _________________________________________________________________
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.           SKsh Amiga Shell            Page 40             Reference Manual
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.           _________________________________________________________________
  2648.  
  2649.             Name:     getenv
  2650.  
  2651.             Type:     Builtin
  2652.  
  2653.             Default:  n/a
  2654.  
  2655.             Usage:    getenv [ var ... ]
  2656.  
  2657.             Range:    n/a
  2658.  
  2659.             About:    getenv  imports  the  values   of   the   indicated
  2660.                       variable from AmigaDos environment  variables  with
  2661.                       the same names.  This command, coupled with  export
  2662.                       command,  allows  variables   to   be   transferred
  2663.                       between executions of SKsh.
  2664.  
  2665.             Example:  getenv my_var1 my_var2
  2666.  
  2667.             See Also: export
  2668.  
  2669.           _________________________________________________________________
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.           SKsh Amiga Shell            Page 41             Reference Manual
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.           _________________________________________________________________
  2714.  
  2715.             Name:     history
  2716.  
  2717.             Type:     Builtin
  2718.  
  2719.             Default:  n/a
  2720.  
  2721.             Usage:    history
  2722.                       history -n
  2723.                       history -e [ pattern | number | offset ]
  2724.  
  2725.             Range:    n/a
  2726.  
  2727.             About:    SKsh maintains the HISTSIZE previous commands in  a
  2728.                       list so that they may later be recalled  or  edited
  2729.                       for re-execution.
  2730.  
  2731.                       history   with  no  parameters  simply  prints  the
  2732.                       history  list,  with  each  line  prefixed  by  the
  2733.                       number  of  the   associated   command.    The   -n
  2734.                       parameter leaves out the line numbers.
  2735.  
  2736.                       history  -e is used to execute  commands  from  the
  2737.                       history  list.   If  given   a   positive   numeric
  2738.                       argument, it executes the history command  at  that
  2739.                       number (note that these numbers  are  derived  from
  2740.                       CMDNUM and do not always begin at  1  if  CMDNUM  >
  2741.                       HISTSIZE).  If given a negative  numeric  argument,
  2742.                       the line executed is the 'nth' before the  current;
  2743.                       thus,  the  example  below  executes  the  previous
  2744.                       command.  If the argument is a string  or  pattern,
  2745.                       the most recent command containing that  string  or
  2746.                       pattern is executed.
  2747.  
  2748.             Example:  history -e -1    # execute previous command
  2749.  
  2750.             See Also: HISTSIZE, !, !!, CMDNUM, command  line  editing  in
  2751.                       the User's Manual.
  2752.  
  2753.           _________________________________________________________________
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.           SKsh Amiga Shell            Page 42             Reference Manual
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.           _________________________________________________________________
  2780.  
  2781.             Name:     HISTSIZE
  2782.  
  2783.             Type:     Variable
  2784.  
  2785.             Default:  32
  2786.  
  2787.             Usage:    $HISTSIZE
  2788.  
  2789.             Range:    0 to 32000
  2790.  
  2791.             About:    SKsh keeps a list  of  the  $HISTSIZE  most  recent
  2792.                       commands available for editing and re-entry.
  2793.  
  2794.             Example:  HISTSIZE=64
  2795.  
  2796.             See Also: history, options
  2797.  
  2798.           _________________________________________________________________
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.           SKsh Amiga Shell            Page 43             Reference Manual
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.           _________________________________________________________________
  2846.  
  2847.             Name:     HOME
  2848.  
  2849.             Type:     Variable
  2850.  
  2851.             Default:  :
  2852.  
  2853.             Usage:    $HOME
  2854.  
  2855.             Range:    n/a
  2856.  
  2857.             About:    This variable represents  the  default  destination
  2858.                       for  the  cd command.  It can be set to  any  valid
  2859.                       directory name.
  2860.  
  2861.             Example:  HOME=.
  2862.  
  2863.             See Also: cd
  2864.  
  2865.           _________________________________________________________________
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.           SKsh Amiga Shell            Page 44             Reference Manual
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.           _________________________________________________________________
  2912.  
  2913.             Name:     if/then/elif/else/fi
  2914.  
  2915.             Type:     Keywords
  2916.  
  2917.             Default:  n/a
  2918.  
  2919.             Usage:    if expr then stmt_list
  2920.                          [ [ elif expr then stmt_list ] ... ]
  2921.                          [ else stmt_list ] fi
  2922.  
  2923.             Range:    n/a
  2924.  
  2925.             About:    If the expression is true (that is,  it  returns  a
  2926.                       zero exit status), then the  first  statement  list
  2927.                       is executed.  If  any  elif statements are present,
  2928.                       each expression is executed, and  if  it  is  true,
  2929.                       execution procedes  for  the  associated  statement
  2930.                       list.  If none of the expressions  were  true,  the
  2931.                       else statement_list is executed.
  2932.  
  2933.                       The expressions can  be  any  command,  or  a  test
  2934.                       expression surrounded by square brackets  (see  the
  2935.                       user's manual for details).
  2936.  
  2937.             Example:  if [ ! -f name -a ! -d name ]
  2938.                       then
  2939.                          mkdir name
  2940.                       else
  2941.                          echo "$name exists already!"
  2942.                       fi
  2943.  
  2944.             See Also: while
  2945.  
  2946.           _________________________________________________________________
  2947.  
  2948.  
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.           SKsh Amiga Shell            Page 45             Reference Manual
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.           _________________________________________________________________
  2978.  
  2979.             Name:     IFS
  2980.  
  2981.             Type:     Variable
  2982.  
  2983.             Default:  " \n\t"
  2984.  
  2985.             Usage:    $IFS
  2986.  
  2987.             Range:    n/a
  2988.  
  2989.             About:    Characters in IFS are  used  to  break  substituted
  2990.                       text  (from  variables  and  command  substitution)
  2991.                       into parameters.  If IFS is set to the null  string
  2992.                       (''),  all  substituted  text  will  be  a   single
  2993.                       parameter.
  2994.  
  2995.                       If the 'i' option to SKsh is set (see  the  options
  2996.                       command), the IFS characters will also be  used  to
  2997.                       break text from $( ) style command substitution.
  2998.  
  2999.             Example:  [dh0:]: IFS=" \n\t"
  3000.                       [dh0:]: a='Now   is   the   time'
  3001.                       [dh0:]: echo $a
  3002.                               Now is the time
  3003.                       [dh0:]: IFS=''
  3004.                       [dh0:]: echo $a
  3005.                               Now   is   the   time
  3006.  
  3007.             See Also:
  3008.  
  3009.           _________________________________________________________________
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.           SKsh Amiga Shell            Page 46             Reference Manual
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.           _________________________________________________________________
  3044.  
  3045.             Name:     inc
  3046.  
  3047.             Type:     Builtin
  3048.  
  3049.             Default:  n/a
  3050.  
  3051.             Usage:    inc var [ count ]
  3052.  
  3053.             Range:    n/a
  3054.  
  3055.             About:    inc increments the  contents  of  the  variable  by
  3056.                       count,  or  1  if  count  is  not  given.   It   is
  3057.                       equivalent to, but faster than, 'var=$(expr $var  +
  3058.                       $count)'
  3059.  
  3060.             Example:  inc my_var 3
  3061.  
  3062.             See Also: dec
  3063.  
  3064.           _________________________________________________________________
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.           SKsh Amiga Shell            Page 47             Reference Manual
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.           _________________________________________________________________
  3110.  
  3111.             Name:     info
  3112.  
  3113.             Type:     Builtin
  3114.  
  3115.             Default:  n/a
  3116.  
  3117.             Usage:    info [ -a ] [ device | directory ] ...
  3118.  
  3119.             Range:    n/a
  3120.  
  3121.             About:    info reports the amount of free space available  on
  3122.                       a given  device  or  directory.   It  prints  total
  3123.                       space in kilobytes, used space  in  kilobytes,  the
  3124.                       free space in kilobytes, the number  of  bytes  per
  3125.                       block, the  percentage  capacity  utilization,  the
  3126.                       total number of errors, and the  volume  name.   If
  3127.                       info is given a directory name as an argument,  the
  3128.                       free space for the directory is  the  same  as  the
  3129.                       free space for the device on  which  the  directory
  3130.                       resides.
  3131.  
  3132.                       The  SKsh  info command reports data in  1024  byte
  3133.                       kilobytes, not 1000 byte kilobytes.  This may  lead
  3134.                       to a slightly  different  answer  than  other  info
  3135.                       commands.    The   SKsh   info  command  will  deal
  3136.                       correctly  with  file  systems  of  up  to  several
  3137.                       gigabytes  (should  you  happen  to  have  one   of
  3138.                       those).
  3139.  
  3140.  
  3141.                       If  the  info command is given the -a flag, it will
  3142.                       report information on  all  the  currently  mounted
  3143.                       devices.
  3144.  
  3145.  
  3146.             Example:  info sys: ram: df0:
  3147.                       info -a       # info for all devices
  3148.  
  3149.             See Also:
  3150.  
  3151.           _________________________________________________________________
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.           SKsh Amiga Shell            Page 48             Reference Manual
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.           _________________________________________________________________
  3176.  
  3177.             Name:     LASTRC
  3178.  
  3179.             Type:     Variable
  3180.  
  3181.             Default:  n/a
  3182.  
  3183.             Usage:    $LASTRC
  3184.  
  3185.             Range:    n/a
  3186.  
  3187.             About:    LASTRC  stores  the  return  code  from  the   last
  3188.                       external command which was  executed.   It  is  not
  3189.                       reset by subsequent internal command return  codes,
  3190.                       as is $?.
  3191.  
  3192.             Example:  some_external_command
  3193.                       echo
  3194.                       if [ $LASTRC -ne 0 ]
  3195.                       then
  3196.                          echo 'command failed!'
  3197.                       fi
  3198.  
  3199.             See Also: $?
  3200.  
  3201.           _________________________________________________________________
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.           SKsh Amiga Shell            Page 49             Reference Manual
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.           _________________________________________________________________
  3242.  
  3243.             Name:     LINES
  3244.  
  3245.             Type:     Variable
  3246.  
  3247.             Default:  24
  3248.  
  3249.             Usage:    $LINES
  3250.  
  3251.             Range:    3 to anything
  3252.  
  3253.             About:    This variable is currently not used by SKsh; it  is
  3254.                       provided  for  future  expansion,  and  for   other
  3255.                       applications   or   programs   which    might    be
  3256.                       interested.
  3257.  
  3258.                       This variable is automatically  set  by  SKsh  when
  3259.                       the  window  is  resized.   This  behavior  can  be
  3260.                       turned off with the options command.
  3261.  
  3262.             Example:  if [ $LINES -lt 20 ]
  3263.                       then
  3264.                          echo "We require at least 20 lines!"
  3265.                       fi
  3266.  
  3267.             See Also: COLUMNS, options
  3268.  
  3269.           _________________________________________________________________
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.           SKsh Amiga Shell            Page 50             Reference Manual
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.           _________________________________________________________________
  3308.  
  3309.             Name:     ll
  3310.  
  3311.             Type:     Alias
  3312.  
  3313.             Default:  ls -lbF
  3314.  
  3315.             Usage:    ll [ file | dir ] ...
  3316.  
  3317.             Range:    n/a
  3318.  
  3319.             About:    ll prints a long  format  directory  listing,  with
  3320.                       only the basename of each file printed.  Note  that
  3321.                       the 'F' option to 'ls' is set.
  3322.  
  3323.             Example:  ll s:
  3324.  
  3325.             See Also: dir, ls
  3326.  
  3327.           _________________________________________________________________
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.           SKsh Amiga Shell            Page 51             Reference Manual
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.           _________________________________________________________________
  3374.  
  3375.             Name:     LLMIN
  3376.  
  3377.             Type:     Variable
  3378.  
  3379.             Default:  4
  3380.  
  3381.             Usage:    $LLMIN
  3382.  
  3383.             Range:    0 to 1023 inclusive
  3384.  
  3385.             About:    LLMIN stores the minimum command  line  length  for
  3386.                       which SKsh will  store  the  line  in  the  history
  3387.                       list.  Put another way,  lines  shorter  than  this
  3388.                       value are not inserted into the history list.   For
  3389.                       example, a  line  containing  only  "cd"  would  be
  3390.                       ignored, as it is just as easy to re-type as it  is
  3391.                       to search for in the history list.
  3392.  
  3393.             Example:  LLMIN=0 # don't ignore any lines, even short ones
  3394.  
  3395.             See Also: MAXDIST, options
  3396.  
  3397.           _________________________________________________________________
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.           SKsh Amiga Shell            Page 52             Reference Manual
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.           _________________________________________________________________
  3440.  
  3441.             Name:     local
  3442.  
  3443.             Type:     Builtin
  3444.  
  3445.             Default:  n/a
  3446.  
  3447.             Usage:    local [ varname ... ]
  3448.  
  3449.             Range:    n/a
  3450.  
  3451.             About:    The  local command  can  be  used  to  enforce  the
  3452.                       creation of local variables if the 'N'  option  and
  3453.                       the 'l' to SKsh are set (see the  options command).
  3454.                       Normally with the 'N' option set,  local  variables
  3455.                       are created only  if  they  had  not  been  created
  3456.                       first in an enclosing context.   The  local command
  3457.                       makes  them  local  even  if  there  had   been   a
  3458.                       previously defined variable of the same name in  an
  3459.                       enclosing context.  Note  that  this  command  will
  3460.                       have  no  effect  if  SKsh  local   variables   are
  3461.                       disabled by turning off the 'l' option.
  3462.  
  3463.             Example:  function my_func {
  3464.                          local answer;
  3465.                          answer = 42
  3466.                       }
  3467.  
  3468.             See Also: options
  3469.  
  3470.           _________________________________________________________________
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.           SKsh Amiga Shell            Page 53             Reference Manual
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.           _________________________________________________________________
  3506.  
  3507.             Name:     LOGOUT
  3508.  
  3509.             Type:     Variable
  3510.  
  3511.             Default:  'echo "\nBye!\n"'
  3512.  
  3513.             Usage:    $LOGOUT
  3514.  
  3515.             Range:    n/a
  3516.  
  3517.             About:    This variable is executed by  SKsh  when  the  exit
  3518.                       command is used to terminate execution.
  3519.  
  3520.             Example:  LOGOUT='';    # do nothing
  3521.  
  3522.             See Also: exit
  3523.  
  3524.           _________________________________________________________________
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.           SKsh Amiga Shell            Page 54             Reference Manual
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.           _________________________________________________________________
  3572.  
  3573.             Name:     ls
  3574.  
  3575.             Type:     Builtin
  3576.  
  3577.             Default:  n/a
  3578.  
  3579.             Usage:    ls [ -aldhi1bvF ] [ dirname | fname ] ...
  3580.  
  3581.             Range:    n/a
  3582.  
  3583.             About:    This command is used to  obtain  information  about
  3584.                       files  or  directories.   With  no  arguments,   it
  3585.                       simply lists the contents of  the  current  working
  3586.                       directory, leaving out files beginning with a  dot.
  3587.                       If the 'I' option to SKsh is set (see  the  options
  3588.                       command), all .info files are also left  out  (this
  3589.                       feature exists because I hate .info files).
  3590.  
  3591.                       The 'a'  option  causes  ls to list files beginning
  3592.                       with a dot.  Similarly, the 'i' option lists  .info
  3593.                       files even if the 'I' option to SKsh is  set.   The
  3594.                       'h' option lists files with the hidden bit set.
  3595.  
  3596.                       The 'l' option creates a  long  format  list,  with
  3597.                       filename,  protection  status,  byte  size,   block
  3598.                       size,  and  modification  date  listed.   (The   ll
  3599.                       command has been aliased to 'ls -l'  to  make  this
  3600.                       easier).
  3601.  
  3602.                       The '1' option creates a  short  format  list  with
  3603.                       one column instead  of  three  (useful  for  piping
  3604.                       filenames into a command).
  3605.  
  3606.                       The 'd' option forces directories to be printed  as
  3607.                       such.   Normally  if  the   ls command is  given  a
  3608.                       directory as an argument, it  prints  the  contents
  3609.                       of  that  directory.    The   'd'   option   prints
  3610.                       information  on  the  directory  itself.   This  is
  3611.                       useful  with   the   'l'   option   to   find   the
  3612.                       modification  date  or  protection  status   of   a
  3613.                       directory.
  3614.  
  3615.                       The 'b' option causes only  the  basename  of  each
  3616.                       file to be printed.  Normally, if a path to a  file
  3617.                       is given, SKsh will print the path  information  in
  3618.                       each  entry  in  the  ls output.   The  'b'  option
  3619.                       leaves out the path information, printing only  the
  3620.                       basename.
  3621.  
  3622.                       The 'v' option prints a  count  of  entries  listed
  3623.                       after the  listing  itself.   Also,  a  total  byte
  3624.                       count is printed, which is the sum of the sizes  of
  3625.  
  3626.  
  3627.           SKsh Amiga Shell            Page 55             Reference Manual
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.                       each file listed.
  3638.  
  3639.                       The  'F'  option  instructs  'ls'  to  output   the
  3640.                       appropriate  _FILE_S,  _FILE_E,   _DIR_S,   _DIR_E,
  3641.                       _EXEC_S, and _EXEC_E  variables  before  and  after
  3642.                       each file name printed in either the short or  long
  3643.                       directory format.  See the documentation  on  those
  3644.                       variables for details on their usage.
  3645.  
  3646.                       The short form  of  the  ls command normally prints
  3647.                       the files in columns.  To decide how  many  columns
  3648.                       there  should  be,   it   examines   the   $COLUMNS
  3649.                       variable, divides the result by the length  of  the
  3650.                       longest file name to be  printed,  and  insures  at
  3651.                       least a three character gutter between columns.
  3652.  
  3653.                       The  ls command outputs an error message if  passed
  3654.                       an argument which does  not  exist  as  a  file  or
  3655.                       directory.
  3656.  
  3657.             Example:  ls -li my_dir   # list my_dir including info files
  3658.  
  3659.             See Also: options, dir, ll
  3660.  
  3661.           _________________________________________________________________
  3662.  
  3663.  
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.           SKsh Amiga Shell            Page 56             Reference Manual
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.           _________________________________________________________________
  3704.  
  3705.             Name:     match
  3706.  
  3707.             Type:     Builtin
  3708.  
  3709.             Default:  n/a
  3710.  
  3711.             Usage:    match [ -v ] pattern [ string ... ]
  3712.  
  3713.             Range:    n/a
  3714.  
  3715.             About:    match prints each string that matches  the  pattern
  3716.                       given in the first argument.   The  pattern  is  of
  3717.                       the same type used by SKsh for filename  wildcards,
  3718.                       but it must be quoted to avoid  being  expanded  in
  3719.                       that manner.  If the 'v' flag is set, only  strings
  3720.                       not matching the pattern are printed.
  3721.  
  3722.             Example:  match '*.[ch]' file1.foo file1.c file2.h my_file
  3723.  
  3724.             See Also:
  3725.  
  3726.           _________________________________________________________________
  3727.  
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733.  
  3734.  
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.           SKsh Amiga Shell            Page 57             Reference Manual
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.           _________________________________________________________________
  3770.  
  3771.             Name:     MAXDIST
  3772.  
  3773.             Type:     Variable
  3774.  
  3775.             Default:  5
  3776.  
  3777.             Usage:    $MAXDIST
  3778.  
  3779.             Range:    0 to 32000 inclusive
  3780.  
  3781.             About:    When a command is entered from  the  keyboard  with
  3782.                       line editing enabled, SKsh checks for an  identical
  3783.                       line in the history list.  If  one  is  found  less
  3784.                       than $MAXDIST  lines  away,  the  new  one  is  not
  3785.                       entered  into  the  history  list.   This  has  two
  3786.                       beneficial effects.  First, if the same command  is
  3787.                       entered several  times  in  a  row,  it  will  only
  3788.                       appear once in the history list.  Second,  commands
  3789.                       which have not been entered for a  long  time  will
  3790.                       be entered again so they do not scroll of  the  end
  3791.                       of  the  list.   This  rule  applies  whether   the
  3792.                       command was  typed  or  accessed  from  a  previous
  3793.                       history list entry.
  3794.  
  3795.             Example:  MAXDIST=10 # re-enter lines if they get too far
  3796.  
  3797.             See Also: LLMIN, options
  3798.  
  3799.           _________________________________________________________________
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.           SKsh Amiga Shell            Page 58             Reference Manual
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.           _________________________________________________________________
  3836.  
  3837.             Name:     mem
  3838.  
  3839.             Type:     Builtin
  3840.  
  3841.             Default:  n/a
  3842.  
  3843.             Usage:    mem [ -tcf ]
  3844.  
  3845.             Range:    n/a
  3846.  
  3847.             About:    mem reports  the  amount  of  free  chip  and  fast
  3848.                       memory, as well as a total.  If  the  't'  flag  is
  3849.                       set, only the total is  printed.   If  the  'c'  is
  3850.                       set, only chip memory is listed,  and  if  the  'f'
  3851.                       flag is set, only fast memory is listed.
  3852.  
  3853.             Example:  if [ $(mem -t ] -lt 400000 ]
  3854.                       then
  3855.                          echo 'you must have at least 400K free'
  3856.                       fi
  3857.  
  3858.             See Also:
  3859.  
  3860.           _________________________________________________________________
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.           SKsh Amiga Shell            Page 59             Reference Manual
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.           _________________________________________________________________
  3902.  
  3903.             Name:     mkdir
  3904.  
  3905.             Type:     Builtin
  3906.  
  3907.             Default:  n/a
  3908.  
  3909.             Usage:    mkdir [ dirname ... ]
  3910.  
  3911.             Range:    n/a
  3912.  
  3913.             About:    mkdir creates directories with names  identical  to
  3914.                       the parameters passed to it.
  3915.  
  3916.             Example:  mkdir my_dir sys:system/my_other_dir
  3917.  
  3918.             See Also: rmdir
  3919.  
  3920.           _________________________________________________________________
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.           SKsh Amiga Shell            Page 60             Reference Manual
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.           _________________________________________________________________
  3968.  
  3969.             Name:     mv
  3970.  
  3971.             Type:     Builtin
  3972.  
  3973.             Default:  n/a
  3974.  
  3975.             Usage:    mv [ -v ] source1 [ source2 ... ] destination
  3976.  
  3977.             Range:    n/a
  3978.  
  3979.             About:    mv moves files or  directories  by  renaming  them.
  3980.                       Thus,  it  cannot  be  used  to  move  data   cross
  3981.                       devices.  If more than one  source  is  given,  the
  3982.                       destination must be  a  directory  or  nonexistant.
  3983.                       If  it  is  nonexistant,  it  is   created   as   a
  3984.                       directory.
  3985.  
  3986.                       The -v option prints the name of each  file  as  it
  3987.                       is moved.
  3988.  
  3989.             Example:  mv my_dir sys:another_dir/my_other_dir
  3990.  
  3991.             See Also: cp
  3992.  
  3993.           _________________________________________________________________
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.           SKsh Amiga Shell            Page 61             Reference Manual
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.           _________________________________________________________________
  4034.  
  4035.             Name:     OLDPWD
  4036.  
  4037.             Type:     Variable
  4038.  
  4039.             Default:  old present working directory string
  4040.  
  4041.             Usage:    $OLDPWD
  4042.  
  4043.             Range:    n/a
  4044.  
  4045.             About:    When the  present  working  directory  is  changed,
  4046.                       SKsh puts the old PWD value into OLDPWD.  The  cd -
  4047.                       p command can be used to return to OLDPWD.
  4048.  
  4049.             Example:  echo $PWD; cd c:; echo $OLDPWD
  4050.  
  4051.             See Also: PWD, pwd, cd
  4052.  
  4053.           _________________________________________________________________
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.           SKsh Amiga Shell            Page 62             Reference Manual
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.           _________________________________________________________________
  4100.  
  4101.             Name:     options
  4102.  
  4103.             Type:     Builtin
  4104.  
  4105.             Default:  n/a
  4106.  
  4107.             Usage:    options [ -opts | +opts ] ...
  4108.  
  4109.             Range:    n/a
  4110.  
  4111.             About:    The  options command provides a way to  change  the
  4112.                       default behavior of SKsh in a number of areas.   If
  4113.                       the command is entered with no  parameters,  simply
  4114.                       prints the  current  options  string,  which  is  a
  4115.                       series  of  letters  and  digits.   Otherwise,   it
  4116.                       examines each parameter in  turn.   Each  parameter
  4117.                       can begin with a '+' or '-'; a '+' turns  "on"  the
  4118.                       options corresponding each letter, and a '-'  turns
  4119.                       them "off".
  4120.  
  4121.                       +1   Set the overstrike/insert  mode  back  to  the
  4122.                            default value after a return.   If  this  flag
  4123.                            is  not  set,   the   overstrike/insert   mode
  4124.                            remains set to what it was previously.
  4125.  
  4126.                       +e   If set, disable command  line  editing.   This
  4127.                            might  be  useful  for  using  SKsh   from   a
  4128.                            terminal  that  does  not  support  the   ANSI
  4129.                            escape sequences SKsh uses for  line  editing.
  4130.                            Note that is flag is SET  in  .skshinit.   You
  4131.                            must reset it in .skshrc if you  wish  to  use
  4132.                            line editing (the .skshrc file  supplied  with
  4133.                            SKsh does this).
  4134.  
  4135.                       +f   If set, disable wildcard filename expansion.
  4136.  
  4137.                       +h   If set, always  create  a  new  history  line,
  4138.                            even if  an  old  command  was  executed  with
  4139.                            'history  -e'  or  the   interactive   editing
  4140.                            facility.  If not  set,  executing  old  lines
  4141.                            will not create a new history entry.
  4142.  
  4143.                       +i   If  set,  use  IFS  to  split  $(  )   command
  4144.                            substitution text,  much  as  it  is  used  to
  4145.                            split variable value expansion text.
  4146.  
  4147.                       +l   If set, variables referenced in  functions  or
  4148.                            parenthetical   subshells   will   be    local
  4149.                            (although  this  also  depends  on   the   'n'
  4150.                            option).  If not set, there will be  no  local
  4151.                            variables.  Note that resetting this flag  may
  4152.                            have large side effects when  running  scripts
  4153.  
  4154.  
  4155.           SKsh Amiga Shell            Page 63             Reference Manual
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.                            and  functions.   The  advantage  is  that  it
  4166.                            takes less memory and is faster.
  4167.  
  4168.                       +n   If set, only read scripts, but do not  execute
  4169.                            their   commands.    This   is   ignored   for
  4170.                            interactive use.
  4171.  
  4172.                       +p   If set,  use  the  exec  prompt  string  mode.
  4173.                            This tells sksh not to use the  prompt  string
  4174.                            as the prompt directly, but rather to pass  it
  4175.                            through the  command  interpreter  first,  and
  4176.                            use  the  results  as  the  prompt.   This  is
  4177.                            slower, but more powerful.
  4178.  
  4179.                       +s   If  set,   sort   filename   parameters   from
  4180.                            wildcard expansion.
  4181.  
  4182.                       +v   If  set,  variable  expansions  which  contain
  4183.                            wildcard characters will  use  those  wildcard
  4184.                            characters   in   filename   matching.     For
  4185.                            example, if the "foo" variable  contains  "*",
  4186.                            then "echo $foo.bar" would echo any file  name
  4187.                            ending with ".bar".  If the v flag  is  RESET,
  4188.                            then it would simply  echo  "*.bar";  ie,  the
  4189.                            value of the  variable  would  be  substituted
  4190.                            but ignored for filename matching.
  4191.  
  4192.                       +x   If set, print each lines as  it  is  executed.
  4193.                            Moderately useful for debugging scripts.
  4194.  
  4195.                       +C   Enable the internal completion list.  See  the
  4196.                            complist command for details.  If  reset,  the
  4197.                            internal completion list will be ignored.
  4198.  
  4199.                       +E   If set, the  tab  key  will  expand  filenames
  4200.                            like <esc><esc>.  This is easier to type,  and
  4201.                            closer  to  the  emacs  completion  mechanism.
  4202.                            (This also requires the 'e' option be reset).
  4203.  
  4204.                       +F   If set, map UNIX style filenames  to  AmigaDos
  4205.                            style file names.  A  leading  '/'  becomes  a
  4206.                            ':', a '~' inserts the contents  of  the  HOME
  4207.                            variable,   a   '.'   becomes   the    current
  4208.                            directory, and two dots become a slash.
  4209.  
  4210.                       +I   If  set,  leave  out  the  .info  files   from
  4211.                            directory listings unless the  'i'  option  to
  4212.                            'ls' is explicitly set.
  4213.  
  4214.                       +N   Create  new  variables  in   a   subshell   or
  4215.                            function only if  a  variable  with  the  same
  4216.                            name does not exist in an outer  context.   If
  4217.                            one does exist, that one will be used  instead
  4218.                            of making a new  local  variable.   This  flag
  4219.  
  4220.  
  4221.           SKsh Amiga Shell            Page 64             Reference Manual
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.                            changes the scoping  rules,  and  can  have  a
  4232.                            large effect in the execution of  scripts  and
  4233.                            functions; it should be used with care.
  4234.  
  4235.                       +O   Use overstrike instead of insert mode  as  the
  4236.                            default for command line editing.
  4237.  
  4238.                       +R   Disable  automatic  setting   of   LINES   and
  4239.                            COLUMNS variables.  Normally, these  variables
  4240.                            are set after the window is  re-sized  at  the
  4241.                            next  interactive   prompt.    To   set   them
  4242.                            manually and not be overridden  by  SKsh,  use
  4243.                            this options flag.
  4244.  
  4245.                       +S   Insert a single blank line  before  and  after
  4246.                            the    prompt     when     typing     commands
  4247.                            interactively.  For  interlace  screens  where
  4248.                            more than 36 or so lines are displayed,  using
  4249.                            the  S  option  can  create  a  more  visually
  4250.                            appealing and "tidy" display.
  4251.  
  4252.                       +U   The U option, if set, causes  SKsh  to  use  a
  4253.                            requester if a component of the path  contains
  4254.                            an  unmounted  volume.   This   also   affects
  4255.                            several other areas, such  as  the  '-m'  test
  4256.                            expression.
  4257.  
  4258.  
  4259.             Example:  # see which options are turned on:
  4260.                       options
  4261.                       # reset all options:
  4262.                       options $(echo -c - '-' $(options))
  4263.  
  4264.             See Also:
  4265.  
  4266.           _________________________________________________________________
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.           SKsh Amiga Shell            Page 65             Reference Manual
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.           _________________________________________________________________
  4298.  
  4299.             Name:     PATH
  4300.  
  4301.             Type:     Variable
  4302.  
  4303.             Default:  '.,c:'
  4304.  
  4305.             Usage:    $PATH
  4306.  
  4307.             Range:    n/a
  4308.  
  4309.             About:    This variable contains a comma  separated  list  of
  4310.                       directory names.  When SKsh  executes  a  file,  it
  4311.                       searches for it in these  directories.   Note  that
  4312.                       the current working  directory  must  be  specified
  4313.                       explicitly (".").  This lets you change  the  order
  4314.                       of the search.  For example, you could move "."  to
  4315.                       the end  of  the  path  to  search  it  last.   The
  4316.                       directory names in the  path  do  not  need  to  be
  4317.                       terminated by a slash; SKsh will add one if  it  is
  4318.                       not there.
  4319.  
  4320.                       If SKsh finds the file name  in  the  search  path,
  4321.                       and the file has its  script  bit  set,  SKsh  will
  4322.                       attempt to execute this file as  a  script  instead
  4323.                       of a binary.
  4324.  
  4325.                       The PATH variable is also  used  by  the  which and
  4326.                       whence commands.
  4327.  
  4328.                       Entries  in  the  path  which  are   on   currently
  4329.                       unmounted devices are bypassed silently.
  4330.  
  4331.             Example:  c:run $(which emacs) my_file
  4332.  
  4333.             See Also: path, which, whence
  4334.  
  4335.           _________________________________________________________________
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.           SKsh Amiga Shell            Page 66             Reference Manual
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.           _________________________________________________________________
  4364.  
  4365.             Name:     path
  4366.  
  4367.             Type:     Function
  4368.  
  4369.             Default:  see the .skshinit file
  4370.  
  4371.             Usage:    path
  4372.                       path name
  4373.                       path -add [ name ... ]
  4374.  
  4375.             Range:    n/a
  4376.  
  4377.             About:    This  function  is  provided  to  make   the   PATH
  4378.                       variable easier to set up and manipulate.
  4379.  
  4380.                       With no  arguments,  path simply prints the current
  4381.                       path definition.
  4382.  
  4383.                       The second form above sets  the  path  variable  to
  4384.                       name.
  4385.  
  4386.                       The third form above adds each  name  to  the  path
  4387.                       variable  list,  provided  that  it  is  not  there
  4388.                       already.  If the name is  already  a  component  of
  4389.                       the path, it is ignored.
  4390.  
  4391.             Example:  path -add sys:bin sys:pd/bin
  4392.  
  4393.             See Also: PATH
  4394.  
  4395.           _________________________________________________________________
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.           SKsh Amiga Shell            Page 67             Reference Manual
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.           _________________________________________________________________
  4430.  
  4431.             Name:     PNPC
  4432.  
  4433.             Type:     Variable
  4434.  
  4435.             Default:  21
  4436.  
  4437.             Usage:    $PNPC
  4438.  
  4439.             Range:    0 to 63
  4440.  
  4441.             About:    This variable is one  of  several  responsible  for
  4442.                       controlling the actions of SKsh  line  editing  and
  4443.                       display output.  PNPC  tells  SKsh  how  many  non-
  4444.                       printing  control  characters  there  are  in   the
  4445.                       currently defined  prompt  strings  (both  PS1  and
  4446.                       PS2).  SKsh needs to know this so that it can  find
  4447.                       the actual printing  width  of  the  prompt  string
  4448.                       from the actual character length.   You  will  only
  4449.                       have to change PNPC if you  change  the  number  of
  4450.                       ANSI control sequences in your prompt.
  4451.  
  4452.             Example:  PNPC=0
  4453.  
  4454.             See Also: COLUMNS, PS1, PS2, options
  4455.  
  4456.           _________________________________________________________________
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.           SKsh Amiga Shell            Page 68             Reference Manual
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.           _________________________________________________________________
  4496.  
  4497.             Name:     ps
  4498.  
  4499.             Type:     Builtin
  4500.  
  4501.             Default:  n/a
  4502.  
  4503.             Usage:    ps
  4504.  
  4505.             Range:    n/a
  4506.  
  4507.             About:    ps  prints,  for  each  CLI  process,  the  process
  4508.                       number, the address of the  process,  the  priority
  4509.                       of the process, the command  name  associated  with
  4510.                       the process, and the current working directory  for
  4511.                       the process.
  4512.  
  4513.             Example:  ps
  4514.  
  4515.             See Also:
  4516.  
  4517.           _________________________________________________________________
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.           SKsh Amiga Shell            Page 69             Reference Manual
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.           _________________________________________________________________
  4562.  
  4563.             Name:     PS1
  4564.  
  4565.             Type:     Variable
  4566.  
  4567.             Default:  '$_ANSI_P3[$PWD]: $_ANSI_P1'
  4568.  
  4569.             Usage:    $PS1
  4570.  
  4571.             Range:    n/a
  4572.  
  4573.             About:    This variable controls the  primary  prompt  string
  4574.                       displayed by SKsh.  If the 'p' SKsh option  is  not
  4575.                       set (see options), SKsh expands  the  variables  in
  4576.                       the string, and outputs it as the  primary  prompt.
  4577.                       For this reason, PS1 should be defined to a  single
  4578.                       quoted string, so that the variables  are  expanded
  4579.                       at the proper time and not when PS1 is defined.
  4580.  
  4581.                       If the 'p' option to SKsh is set,  SKsh  sends  the
  4582.                       contents of the PS1 variable  through  the  command
  4583.                       interpreter,  and  displays  the  result   as   the
  4584.                       primary prompt.  In this case, PS1  should  contain
  4585.                       a  string  which  when  executed,  will  print  the
  4586.                       desired prompt.  This is slower  than  the  default
  4587.                       method above.
  4588.  
  4589.             Example:  PS1='$ '; PNPC=0
  4590.  
  4591.             See Also: PS2, PNPC, options
  4592.  
  4593.           _________________________________________________________________
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.           SKsh Amiga Shell            Page 70             Reference Manual
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.           _________________________________________________________________
  4628.  
  4629.             Name:     PS2
  4630.  
  4631.             Type:     Variable
  4632.  
  4633.             Default:  '$_ANSI_P3> $_ANSI_P1'
  4634.  
  4635.             Usage:    $PS2
  4636.  
  4637.             Range:    n/a
  4638.  
  4639.             About:    This variable controls the secondary prompt  string
  4640.                       displayed by  SKsh.   This  is  the  prompt  string
  4641.                       displayed when SKsh expects  more  input,  such  as
  4642.                       the   continuation   of   a   for   statement    or
  4643.                       unterminated string.
  4644.  
  4645.                       If the 'p' SKsh option is not  set  (see  options),
  4646.                       SKsh expands  the  variables  in  the  string,  and
  4647.                       outputs it  as  the  secondary  prompt.   For  this
  4648.                       reason, PS2 should be defined to  a  single  quoted
  4649.                       string, so that the variables are expanded  at  the
  4650.                       proper time and not when PS2 is defined.
  4651.  
  4652.                       If the 'p' option to SKsh is set,  SKsh  sends  the
  4653.                       contents of the PS2 variable  through  the  command
  4654.                       interpreter,  and  displays  the  result   as   the
  4655.                       secondary  prompt.   In  this  case,   PS2   should
  4656.                       contain a string which when  executed,  will  print
  4657.                       the  desired  prompt.   This  is  slower  than  the
  4658.                       default method above.
  4659.  
  4660.             Example:  PS2=': '; PNPC=0
  4661.  
  4662.             See Also: PS1, PNPC, options
  4663.  
  4664.           _________________________________________________________________
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.           SKsh Amiga Shell            Page 71             Reference Manual
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.           _________________________________________________________________
  4694.  
  4695.             Name:     PWD
  4696.  
  4697.             Type:     Variable
  4698.  
  4699.             Default:  present working directory string
  4700.  
  4701.             Usage:    $PWD
  4702.  
  4703.             Range:    n/a
  4704.  
  4705.             About:    SKsh maintains the contents of this  variable  such
  4706.                       that  it  always  represents  the  current  working
  4707.                       directory.
  4708.  
  4709.             Example:  old_dir="$PWD";    # save old directory
  4710.  
  4711.             See Also: OLDPWD, pwd, cd
  4712.  
  4713.           _________________________________________________________________
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.           SKsh Amiga Shell            Page 72             Reference Manual
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.           _________________________________________________________________
  4760.  
  4761.             Name:     pwd
  4762.  
  4763.             Type:     Alias
  4764.  
  4765.             Default:  echo "$PWD"
  4766.  
  4767.             Usage:    pwd
  4768.  
  4769.             Range:    n/a
  4770.  
  4771.             About:    This  alias  simply  prints  the  present   working
  4772.                       directory string.
  4773.  
  4774.             Example:  pwd
  4775.  
  4776.             See Also: PWD, OLDPWD
  4777.  
  4778.           _________________________________________________________________
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.           SKsh Amiga Shell            Page 73             Reference Manual
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.           _________________________________________________________________
  4826.  
  4827.             Name:     quit
  4828.  
  4829.             Type:     Alias
  4830.  
  4831.             Default:  LOGOUT=""; exit
  4832.  
  4833.             Usage:    pwd
  4834.  
  4835.             Range:    n/a
  4836.  
  4837.             About:    quit  is  like  exit but does not execute the value
  4838.                       of the LOGOUT variable first.
  4839.  
  4840.             Example:  pwd
  4841.  
  4842.             See Also: exit, logout, LOGOUT
  4843.  
  4844.           _________________________________________________________________
  4845.  
  4846.  
  4847.  
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.           SKsh Amiga Shell            Page 74             Reference Manual
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.           _________________________________________________________________
  4892.  
  4893.             Name:     read
  4894.  
  4895.             Type:     Builtin
  4896.  
  4897.             Default:  n/a
  4898.  
  4899.             Usage:    read var
  4900.  
  4901.             Range:    n/a
  4902.  
  4903.             About:    The  read command sets the value of the variable by
  4904.                       reading  exactly  one  command  from  the  standard
  4905.                       input.  This can be used to accept input  from  the
  4906.                       keyboard, or it can have  its  own  standard  input
  4907.                       redirected  to  read  lines  from  a  file.    Read
  4908.                       returns a non-zero return code when  it  encounters
  4909.                       an end-of-file; this is useful in loops.
  4910.  
  4911.             Example:  while read in_line
  4912.                       do
  4913.                          echo "We read: $in_line"
  4914.                       done < my_input_file.txt
  4915.  
  4916.             See Also:
  4917.  
  4918.           _________________________________________________________________
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.           SKsh Amiga Shell            Page 75             Reference Manual
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.           _________________________________________________________________
  4958.  
  4959.             Name:     return
  4960.  
  4961.             Type:     Builtin
  4962.  
  4963.             Default:  n/a
  4964.  
  4965.             Usage:    return [ num ]
  4966.  
  4967.             Range:    n/a
  4968.  
  4969.             About:    The  return command exits from an enclosing script,
  4970.                       subshell,  or  function.   If   given   a   numeric
  4971.                       argument, it exits from the nth  enclosing  script,
  4972.                       subshell, or function.
  4973.  
  4974.             Example:  ( echo foo; return; echo 'This is not echoed' )
  4975.  
  4976.             See Also: continue, break
  4977.  
  4978.           _________________________________________________________________
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.           SKsh Amiga Shell            Page 76             Reference Manual
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.  
  5023.           _________________________________________________________________
  5024.  
  5025.             Name:     rm
  5026.  
  5027.             Type:     Builtin
  5028.  
  5029.             Default:  n/a
  5030.  
  5031.             Usage:    rm [ -rv ] [ file | dir ] ...
  5032.  
  5033.             Range:    n/a
  5034.  
  5035.             About:    This command simply removes the  named  files.   It
  5036.                       will not remove directories unless  the  '-r'  flag
  5037.                       is  used;  use  rmdir to  remove  a  single,  empty
  5038.                       directory.
  5039.  
  5040.                       The '-r' flag causes  'rm'  to  recursively  remove
  5041.                       everything under each directory.  This is  somewhat
  5042.                       dangerous; care should be used.
  5043.  
  5044.                       The '-v' flag prints the name of each  file  as  it
  5045.                       is removed.
  5046.  
  5047.             Example:  rm scrap_file.c
  5048.  
  5049.             See Also: rmdir
  5050.  
  5051.           _________________________________________________________________
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.           SKsh Amiga Shell            Page 77             Reference Manual
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.           _________________________________________________________________
  5090.  
  5091.             Name:     rmdir
  5092.  
  5093.             Type:     Builtin
  5094.  
  5095.             Default:  n/a
  5096.  
  5097.             Usage:    rmdir [ dir ... ]
  5098.  
  5099.             Range:    n/a
  5100.  
  5101.             About:    This command simply removes the named  directories.
  5102.                       It will not remove files or directories  which  are
  5103.                       not empty.
  5104.  
  5105.             Example:  rmdir scrap_dir
  5106.  
  5107.             See Also: rmdir
  5108.  
  5109.           _________________________________________________________________
  5110.  
  5111.  
  5112.  
  5113.  
  5114.  
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.           SKsh Amiga Shell            Page 78             Reference Manual
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.           _________________________________________________________________
  5156.  
  5157.             Name:     ROOT
  5158.  
  5159.             Type:     Variable
  5160.  
  5161.             Default:  ":"
  5162.  
  5163.             Usage:    path names beginning with '/'
  5164.  
  5165.             Range:    Any legal directory or filesystem device name
  5166.  
  5167.             About:    When  Un*x  filename  mapping  is  used  (see   the
  5168.                       options command), SKsh  replaces  a  leading  slash
  5169.                       with  the  contents  of  this  variable.    It   is
  5170.                       normally a colon, which makes the path name  become
  5171.                       relative to  the  "root"  of  the  current  device.
  5172.                       However,  it  can  be  set  to  any  directory   or
  5173.                       filesystem device name.  For  example,  if  set  to
  5174.                       "sys:", all file references beginning with a  slash
  5175.                       will  become  relative  to  'sys:',  even  if   the
  5176.                       current working directory  is  on  another  device.
  5177.                       If can also be set to a subdirectory of  a  device,
  5178.                       as in the example below, in which case it must  end
  5179.                       with a slash.
  5180.  
  5181.             Example:  ROOT=sys:usr/work/    # make this the new "root"
  5182.  
  5183.             See Also: options
  5184.  
  5185.           _________________________________________________________________
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.           SKsh Amiga Shell            Page 79             Reference Manual
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.           _________________________________________________________________
  5222.  
  5223.             Name:     set
  5224.  
  5225.             Type:     Builtin
  5226.  
  5227.             Default:  n/a
  5228.  
  5229.             Usage:    set [ -fabvs ] [ pattern ... ]
  5230.  
  5231.             Range:    n/a
  5232.  
  5233.             About:    With  no  options,  set lists each variable and its
  5234.                       definition.  If  pattern  arguments,  each  one  is
  5235.                       listed.  The 'f' options forces  interpretation  as
  5236.                       function names, the 'a' option as alias names,  the
  5237.                       'b' option as builtin command names,  and  the  'v'
  5238.                       option as variables names (the default).
  5239.  
  5240.                       The 's' option leaves out the definition,  printing
  5241.                       only the name on  a  single  line.   In  any  case,
  5242.                       function  definitions  are  not  listed   in   this
  5243.                       version of SKsh.  If the 's' option  is  used,  the
  5244.                       'v'  option  must  explicitly  be   set   to   list
  5245.                       variables.  Also, more than one of 'f',  'a',  'b',
  5246.                       and 'v' may be set.
  5247.  
  5248.                       SKsh will not list any  function,  alias,  builtin,
  5249.                       or variable whose name begins  with  an  underscore
  5250.                       (hidden variables, etc).  This is useful to  either
  5251.                       hide definitions from  users,  or  in  cases  where
  5252.                       printing the contents of a variable  would  corrupt
  5253.                       the display (such as the _ANSI_CLEAR variable).
  5254.  
  5255.                       The definition of builtin commands is printed as  a
  5256.                       short description of the command.
  5257.  
  5258.                       The  set command cannot be used to  set  variables,
  5259.                       as in csh.  Use the assignment operator  ('=')  for
  5260.                       that.
  5261.  
  5262.             Example:  set -b '[a-d]*'
  5263.  
  5264.             See Also: unset
  5265.  
  5266.           _________________________________________________________________
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.           SKsh Amiga Shell            Page 80             Reference Manual
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.           _________________________________________________________________
  5288.  
  5289.             Name:     SHELL
  5290.  
  5291.             Type:     Variable
  5292.  
  5293.             Default:  sksh
  5294.  
  5295.             Usage:    $SHELL
  5296.  
  5297.             Range:    n/a
  5298.  
  5299.             About:    This variable is set by SKsh to the string  "sksh".
  5300.                       It can be used to  test  which  shell  is  running,
  5301.                       provided that the alternate  shell  has  a  similar
  5302.                       syntax.
  5303.  
  5304.             Example:  if [ "$SHELL" != 'sksh' ]
  5305.                       then
  5306.                           echo "This runs only under SKsh!"
  5307.                       fi
  5308.  
  5309.             See Also: SYSNAME
  5310.  
  5311.           _________________________________________________________________
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.           SKsh Amiga Shell            Page 81             Reference Manual
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.           _________________________________________________________________
  5354.  
  5355.             Name:     shift
  5356.  
  5357.             Type:     Builtin
  5358.  
  5359.             Default:  n/a
  5360.  
  5361.             Usage:    shift [ num ]
  5362.  
  5363.             Range:    n/a
  5364.  
  5365.             About:    This  command  is  used  inside   of   scripts   or
  5366.                       functions to shift the parametric  arguments.   For
  5367.                       example, if $1 = 'foo' and  $2  =  'bar',  after  a
  5368.                       shift, $1 would be 'bar' and $2 would not  be  set.
  5369.                       The '$#'  and  '$*'  variables  are  also  modified
  5370.                       appropriately.   If  shift  is  given   a   numeric
  5371.                       parameter,  it  acts  as  though  num   consecutive
  5372.                       shifts took place.
  5373.  
  5374.             Example:  function my_func {
  5375.                          echo "$2, $#"
  5376.                          shift
  5377.                          echo "$2, $#"
  5378.                       }
  5379.  
  5380.             See Also: function
  5381.  
  5382.           _________________________________________________________________
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.           SKsh Amiga Shell            Page 82             Reference Manual
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.           _________________________________________________________________
  5420.  
  5421.             Name:     SIZE
  5422.  
  5423.             Type:     Variable
  5424.  
  5425.             Default:  "normal" for plain SKsh
  5426.                       "tiny" for tiny_SKsh
  5427.  
  5428.             Usage:    $SIZE
  5429.  
  5430.             Range:    n/a
  5431.  
  5432.             About:    This variable can be used to test the shell under which  a
  5433.                       script or function is being run.
  5434.  
  5435.             Example:  if [ "$SIZE" = 'normal' ]
  5436.                       then
  5437.                          echo 'This is normal SKsh'
  5438.                       else
  5439.                          echo 'This is tiny_SKsh'
  5440.                       fi
  5441.  
  5442.             See Also:
  5443.  
  5444.           _________________________________________________________________
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.           SKsh Amiga Shell            Page 83             Reference Manual
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.           _________________________________________________________________
  5486.  
  5487.             Name:     sleep
  5488.  
  5489.             Type:     Builtin
  5490.  
  5491.             Default:  n/a
  5492.  
  5493.             Usage:    sleep n
  5494.  
  5495.             Range:    n/a
  5496.  
  5497.             About:    Sleep  delays  execution  for  n seconds.  If  n is
  5498.                       omitted, zero, or negative, the  command  does  not
  5499.                       pause.  Sleep takes  virtually  no  CPU  time.   It
  5500.                       will wake up once  per  second  to  check  for  the
  5501.                       break key.  Sleep is not guaranteed to be  a  delay
  5502.                       of  exactly  n seconds; it may be more on a  loaded
  5503.                       system,  or  if  SKsh  is  preempted  by  a  higher
  5504.                       priority process.  It is,  however,  guaranteed  to
  5505.                       be a delay of at least n seconds.
  5506.  
  5507.             Example:  time sleep 5
  5508.  
  5509.             See Also: time
  5510.  
  5511.           _________________________________________________________________
  5512.  
  5513.  
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.           SKsh Amiga Shell            Page 84             Reference Manual
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.           _________________________________________________________________
  5552.  
  5553.             Name:     source
  5554.  
  5555.             Type:     Builtin
  5556.  
  5557.             Default:  n/a
  5558.  
  5559.             Usage:    source [ file ... ]
  5560.  
  5561.             Range:    n/a
  5562.  
  5563.             About:    This  command  "sources" the named files; that  is,
  5564.                       they are executed, but not in a subshell,  so  that
  5565.                       any variables, alias, etc,  that  they  define  are
  5566.                       really defined in the parent's environment.
  5567.  
  5568.                       A single dot ('.') may be used to source a file  as
  5569.                       well; this is compatible with ksh and sh.
  5570.  
  5571.                       A file which is sourced does not have to  have  its
  5572.                       script bit set (although it won't hurt).   However,
  5573.                       a script file which is to  be  executed  by  typing
  5574.                       its name must have its script bit set.
  5575.  
  5576.                       Executing a file is equivalent to:
  5577.  
  5578.                          ( source file )
  5579.  
  5580.             Example:  source my_init_file.sksh
  5581.  
  5582.             See Also:
  5583.  
  5584.           _________________________________________________________________
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.           SKsh Amiga Shell            Page 85             Reference Manual
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.           _________________________________________________________________
  5618.  
  5619.             Name:     stack
  5620.  
  5621.             Type:     Function
  5622.  
  5623.             Default:  see the .skshinit file
  5624.  
  5625.             Usage:    stack
  5626.                       stack size
  5627.  
  5628.             Range:    4000 <= size <= 128000
  5629.  
  5630.             About:    This function is provided to set or examine the  stack
  5631.                       size.  With no arguments, it prints the current  stack
  5632.                       size using c:stack.  With one argument,  it  sets  the
  5633.                       stack size to 10000 bytes plus the argument.  This  is
  5634.                       necessary because SKsh itself requires 10000 bytes  of
  5635.                       memory, and executed programs require their  stack  in
  5636.                       addition to this.
  5637.  
  5638.             Example:  stack 16000
  5639.  
  5640.             See Also:
  5641.  
  5642.           _________________________________________________________________
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.  
  5672.  
  5673.           SKsh Amiga Shell            Page 86             Reference Manual
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.           _________________________________________________________________
  5684.  
  5685.             Name:     SYSNAME
  5686.  
  5687.             Type:     Variable
  5688.  
  5689.             Default:  'Amiga'
  5690.  
  5691.             Usage:    $SYSNAME
  5692.  
  5693.             Range:    n/a
  5694.  
  5695.             About:    This variable describes the system  on  which  SKsh
  5696.                       is currently being run.  There  is  currently  only
  5697.                       one version of SKsh, so this variable will  contain
  5698.                       "Amiga".  If SKsh is ported to other systems,  this
  5699.                       variable can be used to determine the name  of  the
  5700.                       system.
  5701.  
  5702.             Example:  if [ "$SYSNAME" != 'Amiga' ]
  5703.                       then
  5704.                          echo "This script runs only on Amigas."
  5705.                       fi
  5706.  
  5707.             See Also: SHELL
  5708.  
  5709.           _________________________________________________________________
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.           SKsh Amiga Shell            Page 87             Reference Manual
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747.  
  5748.  
  5749.           _________________________________________________________________
  5750.  
  5751.             Name:     time
  5752.  
  5753.             Type:     Keyword
  5754.  
  5755.             Default:  n/a
  5756.  
  5757.             Usage:    time statement
  5758.  
  5759.             Range:    n/a
  5760.  
  5761.             About:    time  executes  the  statement   and   prints   the
  5762.                       execution time in seconds.
  5763.  
  5764.             Example:  time ( dir; sleep 2 )
  5765.  
  5766.             See Also:
  5767.  
  5768.           _________________________________________________________________
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.  
  5803.  
  5804.  
  5805.           SKsh Amiga Shell            Page 88             Reference Manual
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813.  
  5814.  
  5815.           _________________________________________________________________
  5816.  
  5817.             Name:     touch
  5818.  
  5819.             Type:     Builtin
  5820.  
  5821.             Default:  n/a
  5822.  
  5823.             Usage:    touch [ file ... ]
  5824.  
  5825.             Range:    n/a
  5826.  
  5827.             About:    touch create the named files if they do not  exist,
  5828.                       and in  any  case  updates  the  file  modification
  5829.                       timestamp.  It also  resets  the  AmigaDos  archive
  5830.                       bit.
  5831.  
  5832.             Example:  touch aaa bbb ccc
  5833.  
  5834.             See Also:
  5835.  
  5836.           _________________________________________________________________
  5837.  
  5838.  
  5839.  
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.           SKsh Amiga Shell            Page 89             Reference Manual
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.           _________________________________________________________________
  5882.  
  5883.             Name:     true
  5884.  
  5885.             Type:     Builtin
  5886.  
  5887.             Default:  n/a
  5888.  
  5889.             Usage:    true
  5890.  
  5891.             Range:    n/a
  5892.  
  5893.             About:    true simply returns a  true  exit  code,  and  does
  5894.                       nothing else.
  5895.  
  5896.             Example:  while true
  5897.                       do
  5898.                          echo 'repeat forever!'
  5899.                          sleep 1
  5900.                       done
  5901.  
  5902.             See Also: false
  5903.  
  5904.           _________________________________________________________________
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.  
  5937.           SKsh Amiga Shell            Page 90             Reference Manual
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.           _________________________________________________________________
  5948.  
  5949.             Name:     unalias
  5950.  
  5951.             Type:     Alias
  5952.  
  5953.             Default:  unset -a
  5954.  
  5955.             Usage:    unalias [ name ... ]
  5956.  
  5957.             Range:    n/a
  5958.  
  5959.             About:    This  alias  removes  existing  aliases  from   the
  5960.                       current  context.   If  no  names  are  given,  the
  5961.                       command  has  no  effect.   Otherwise,  each  alias
  5962.                       listed is removed, if it was in fact an alias.
  5963.  
  5964.                       SKsh supplied aliases may be removed, but  this  is
  5965.                       not recommended.
  5966.  
  5967.             Example:  unalias my_alias my_other_alias
  5968.  
  5969.             See Also: unset
  5970.  
  5971.           _________________________________________________________________
  5972.  
  5973.  
  5974.  
  5975.  
  5976.  
  5977.  
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.           SKsh Amiga Shell            Page 91             Reference Manual
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.           _________________________________________________________________
  6014.  
  6015.             Name:     unfunc
  6016.  
  6017.             Type:     Alias
  6018.  
  6019.             Default:  unset -f
  6020.  
  6021.             Usage:    unfunc [ name ... ]
  6022.  
  6023.             Range:    n/a
  6024.  
  6025.             About:    This alias  removes  existing  functions  from  the
  6026.                       current  context.   If  no  names  are  given,  the
  6027.                       command has no effect.   Otherwise,  each  function
  6028.                       listed is removed, if it was in fact an function.
  6029.  
  6030.                       SKsh supplied functions may be  removed,  but  this
  6031.                       is not recommended.
  6032.  
  6033.             Example:  function my_function my_other_function
  6034.  
  6035.             See Also: unset
  6036.  
  6037.           _________________________________________________________________
  6038.  
  6039.  
  6040.  
  6041.  
  6042.  
  6043.  
  6044.  
  6045.  
  6046.  
  6047.  
  6048.  
  6049.  
  6050.  
  6051.  
  6052.  
  6053.  
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.  
  6069.           SKsh Amiga Shell            Page 92             Reference Manual
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.           _________________________________________________________________
  6080.  
  6081.             Name:     unset
  6082.  
  6083.             Type:     Builtin
  6084.  
  6085.             Default:  n/a
  6086.  
  6087.             Usage:    unset [ -favb ] [ name ... ] 
  6088.  
  6089.             Range:    n/a
  6090.  
  6091.             About:    This command removes the definition  of  functions,
  6092.                       aliases, variables, or builtins (controlled by  the
  6093.                       f, a, v, or b flags).  If no  flag  is  given,  the
  6094.                       default is to remove variable definitions.
  6095.  
  6096.                       Unsetting a builtin (with the -b option)  does  not
  6097.                       cause actual code to be  removed  from  memory;  it
  6098.                       simply removes  all  internal  references  to  that
  6099.                       command, such that it appears to no  longer  exist.
  6100.                       This can cause  problems  if  not  used  carefully;
  6101.                       only attempt this if you are  sure  you  know  what
  6102.                       effects  this  will  have.   For  example,  if  you
  6103.                       remove the 'exit' builtin, you will not be able  to
  6104.                       quite SKsh.
  6105.  
  6106.             Example:  unset -f my_func1 my_func2
  6107.  
  6108.             See Also: unfunc, unalias
  6109.  
  6110.           _________________________________________________________________
  6111.  
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.  
  6135.           SKsh Amiga Shell            Page 93             Reference Manual
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.           _________________________________________________________________
  6146.  
  6147.             Name:     variables
  6148.  
  6149.             Type:     Alias
  6150.  
  6151.             Default:  set -v
  6152.  
  6153.             Usage:    variables [-s] [pattern]
  6154.  
  6155.             Range:    n/a
  6156.  
  6157.             About:    This alias lists defined  variables.   The  pattern
  6158.                       uses normal wildcards, but must be quoted to  avoid
  6159.                       being  interpreted  by   the   filename   expansion
  6160.                       mechanism.   If  the  pattern   is   omitted,   all
  6161.                       variables are listed except  those  beginning  with
  6162.                       an underscore character  (hidden  variables).   For
  6163.                       example, _ANSI_P1 is a hidden variable; if  it  was
  6164.                       printed in the normal variable  list,  the  display
  6165.                       pen would be changed.
  6166.  
  6167.                       Only variables for the current context are  listed,
  6168.                       so this command may have a different effect  inside
  6169.                       of  a  subshell  or  function   than   when   typed
  6170.                       manually.
  6171.  
  6172.             Example:  variables -s '[A-H]*'
  6173.  
  6174.             See Also: set
  6175.  
  6176.           _________________________________________________________________
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.           SKsh Amiga Shell            Page 94             Reference Manual
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.  
  6211.           _________________________________________________________________
  6212.  
  6213.             Name:     version
  6214.  
  6215.             Type:     Builtin
  6216.  
  6217.             Default:  n/a
  6218.  
  6219.             Usage:    version [ -ds ]
  6220.  
  6221.             Range:    n/a
  6222.  
  6223.             About:    version with no options  prints  the  SKsh  version
  6224.                       string  and  copyright  notice.   The  'd'   option
  6225.                       echoes the  compile  date  of  SKsh,  and  the  's'
  6226.                       option prints a single numeric value that  will  be
  6227.                       incremented for each  release  of  SKsh.   This  is
  6228.                       useful in tests, as below.
  6229.  
  6230.             Example:  if [ $(version -s) -lt 3 ]
  6231.                       then
  6232.                          echo  'This  script  requires   a   later   SKsh
  6233.                       version'
  6234.                       fi
  6235.  
  6236.             See Also:
  6237.  
  6238.           _________________________________________________________________
  6239.  
  6240.  
  6241.  
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.           SKsh Amiga Shell            Page 95             Reference Manual
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.           _________________________________________________________________
  6278.  
  6279.             Name:     whence
  6280.  
  6281.             Type:     Builtin
  6282.  
  6283.             Default:  n/a
  6284.  
  6285.             Usage:    whence [ name ... ]
  6286.  
  6287.             Range:    n/a
  6288.  
  6289.             About:    whence reports how each name would  be  interpreted
  6290.                       if it was  used  as  a  command.   It  will  report
  6291.                       whether the name will be interpreted as  a  builtin
  6292.                       command, an  alias,  a  function,  or  an  external
  6293.                       statement.  If the command  is  interpreted  as  an
  6294.                       external  statement,  a  path  to  the  command  is
  6295.                       printed.
  6296.  
  6297.             Example:  whence whence if path ll
  6298.  
  6299.             See Also: which
  6300.  
  6301.           _________________________________________________________________
  6302.  
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309.  
  6310.  
  6311.  
  6312.  
  6313.  
  6314.  
  6315.  
  6316.  
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.  
  6333.           SKsh Amiga Shell            Page 96             Reference Manual
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341.  
  6342.  
  6343.           _________________________________________________________________
  6344.  
  6345.             Name:     which
  6346.  
  6347.             Type:     Builtin
  6348.  
  6349.             Default:  n/a
  6350.  
  6351.             Usage:    which [ -s ] [ name ... ]
  6352.  
  6353.             Range:    n/a
  6354.  
  6355.             About:    which searches the current  PATH  variable  for  an
  6356.                       occurrence of name.  If it finds one, the  path  to
  6357.                       name is printed.  Multiple names are  accepted,  in
  6358.                       which case the process is repeated for each one.
  6359.  
  6360.                       If the '-s' option is  set,  which  will  terminate
  6361.                       silently if the name is not  found  in  the  search
  6362.                       path.   Normally  it  prints  a  message  to   that
  6363.                       effect.
  6364.  
  6365.                       Although  which does  not  know  about  aliases  or
  6366.                       functions  as  whence does, it is often more useful
  6367.                       in scripts or from the command line.  For  example,
  6368.                       if you know that "my_file" is in the  search  path,
  6369.                       you can say:
  6370.  
  6371.                          ll $(which -s my_file)
  6372.  
  6373.                       to print information  on  my_file  without  knowing
  6374.                       where  it  is.   The  example  below   is   another
  6375.                       possible use.  In the function, which is used  both
  6376.                       to  avoid  interpreting  "run"  recursively  as   a
  6377.                       function,  and  to  find  the  desired  binary.   A
  6378.                       better form of the 'run' function is included  with
  6379.                       the default '.skshinit' file.
  6380.  
  6381.             Example:  function run {
  6382.                          cmd="$1"
  6383.                          shift
  6384.                          $(which -s run) $(which $cmd) $*
  6385.                       }
  6386.  
  6387.             See Also: whence
  6388.  
  6389.           _________________________________________________________________
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.           SKsh Amiga Shell            Page 97             Reference Manual
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.  
  6409.           _________________________________________________________________
  6410.  
  6411.             Name:     while/do/done
  6412.  
  6413.             Type:     Keywords
  6414.  
  6415.             Default:  n/a
  6416.  
  6417.             Usage:    while expr do stmt_list done
  6418.  
  6419.             Range:    n/a
  6420.  
  6421.             About:    The  statement   list   is   executed   while   the
  6422.                       expression is true (returns a zero exit status).
  6423.  
  6424.             Example:  a=1
  6425.                       while [ $a -le 10 ]
  6426.                       do
  6427.                          echo "a = $a"
  6428.                       done
  6429.  
  6430.             See Also: for
  6431.  
  6432.           _________________________________________________________________
  6433.  
  6434.  
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.  
  6465.           SKsh Amiga Shell            Page 98             Reference Manual
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.  
  6494.  
  6495.  
  6496.  
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.           SKsh Amiga Shell            Page 99             Reference Manual
  6532.  
  6533.  
  6534.  
  6535.